【发布时间】:2017-01-04 15:28:26
【问题描述】:
我一般是使用 Neo4j 的新手,但是 http 连接器上的 Neo4j CE 3.1 浏览器工作得非常顺利。现在我需要使用 JavaScript 来开发图形可视化,而驱动程序根本不起作用。我下载了 neo4j-javascript-driver-1.1,然后 npm 安装 npm WARN 可选跳过可选依赖:fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup 跳过可选依赖:fsevents@1.0.15 不受支持的平台:想要 {"os":"darwin","arch":"any"}(当前:{"os":"win32","arch": "x64"})
npm build (fine)
npm test (problems)
我能理解的是螺栓连接器需要配置,所以我添加到配置文件中以启用螺栓连接。这使无法连接的消息消失了。现在我遇到了这个问题:
npm test
> neo4j-driver@1.1.0-dev test C:\neo4j-javascript-driver-1.1\neo4j-javascript-driver-1.1
> gulp test
[15:00:37] Using gulpfile (node:9436) DeprecationWarning: `DEBUG_FD` is deprecated. Override `debug.log` if you want to use a different log function (https://git.io/vMUyr)
C:\neo4j-javascript-driver-1.1\neo4j-javascript-driver-1.1\gulpfile.js
[15:00:37] Starting 'test'...
[15:00:37] Starting 'nodejs'...
[15:00:39] Finished 'nodejs' after 1.86 s
[15:00:39] Starting 'test-nodejs'...
................Structure {
signature: 127,
fields:
[ { code: 'Neo.ClientError.Security.Unauthorized',
message: 'The client is unauthorized due to authentication failure.' } ] }
FF...........FF.............F(node:9436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: This socket has been ended by the other party
(node:9436) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:9436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: This socket has been ended by the other party
F(node:9436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: This socket has been ended by the other party
(node:9436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): Error: This socket has been ended by the other party
F(node:9436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 7): Error: This socket has been ended by the other party
(node:9436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): Error: This socket has been ended by the other party
F(node:9436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): Error: This socket has been ended by the other party
(node:9436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 11): Error: This socket has been ended by the other party
F(node:9436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 13): Error: This socket has been ended by the other party
(node:9436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 14): Error: This socket has been ended by the other party
C:\neo4j-javascript-driver-1.1\neo4j-javascript-driver-1.1\test\v1\examples.test.js:195
expect(out[0].length).toBe(3);
^
TypeError: Cannot read property 'length' of undefined
at Timeout._onTimeout (C:\neo4j-javascript-driver-1.1\neo4j-javascript-driver-1.1\test\v1\examples.test.js:195:20)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
npm ERR! Test failed. See above for more details.
Process finished with exit code 1
我已在 Windows 10 命令提示符下尝试过此操作,并得到与 WebStorm 2016.3.2 内部相同的响应,
我在尝试 localhost:7687 时也收到以下响应,因为我收到无法连接的错误
not a WebSocket handshake request: missing upgrade
我猜这是因为它通过http连接,而这个端口是一个螺栓连接,只通过驱动程序。
我对 localhost:7474 浏览器的 http 连接(用户名和密码)进行了身份验证,感谢您对如何配置螺栓连接的身份验证的帮助,
提前致谢,
【问题讨论】:
标签: neo4j