我几乎复制了这个例子并调整了数据库查询。我不明白为什么无法识别驱动程序?
版本:节点:v11.13.0 neo4j-driver:“^1.7.5”
我得到错误:
var driver = neo4j.v1.driver(
^
TypeError: Cannot read property 'driver' of undefined
我的代码:
var neo4j = require('neo4j-driver').v1;
var driver = neo4j.v1.driver(
'bolt://localhost:7687',
neo4j.auth.basic('neo4j', 'Neo4j')
)
var session = driver.session()
session
.run('MATCH (n:Person) return n', {
//nameParam: 'Alice'
})
.subscribe({
onNext: function(record) {
console.log(record.get('n'))
},
onCompleted: function() {
session.close()
},
onError: function(error) {
console.log(error)
}
})