hi, I am trying to follow the steps in " Building Neo4j Applications with Node.js" and while trying to perform the tests as described in the course I am getting error. PFB. Please help:
gitpod /workspace/app-nodejs/src (main) $ npm install --save neo4j-driver
up to date, audited 556 packages in 2s
66 packages are looking for funding
run npm fund
for details
10 vulnerabilities (4 low, 2 moderate, 4 high)
To address all issues, run:
npm audit fix
Run npm audit
for details.
gitpod /workspace/app-nodejs/src (main) $ npm run test 01
neoflix-api-node@0.1.0 test
node --experimental-vm-modules node_modules/jest/bin/jest.js 01
(node:2041) ExperimentalWarning: VM Modules is an experimental feature and might change at any time
(Use node --trace-warnings ...
to show where the warning was created)
FAIL test/challenges/01-connect-to-neo4j.spec.js
- Initiate Driver
✕ Should create a driver instance and connect to server (15 ms)
✕ Driver has been instantiated
✕ Driver can verify connectivity (1 ms)
● 01. Initiate Driver › Should create a driver instance and connect to server
**Neo4jError: Could not perform discovery. No routing servers available. Known routing table: RoutingTable[database=default database, expirationTime=0, currentTime=1744122305178, routers=[], readers=[], writers=[]]**
at Neo4jError.GQLError [as constructor] (node_modules/neo4j-driver-core/lib/error.js:117:24)
at new Neo4jError (node_modules/neo4j-driver-core/lib/error.js:204:28)
at newError (node_modules/neo4j-driver-core/lib/error.js:246:12)
at RoutingConnectionProvider.<anonymous> (node_modules/neo4j-driver-bolt-connection/lib/connection-provider/connection-provider-routing.js:735:68)
at step (node_modules/neo4j-driver-bolt-connection/lib/connection-provider/connection-provider-routing.js:98:23)
at Object.next (node_modules/neo4j-driver-bolt-connection/lib/connection-provider/connection-provider-routing.js:79:53)
at node_modules/neo4j-driver-bolt-connection/lib/connection-provider/connection-provider-routing.js:73:71
at Object.<anonymous>.__awaiter (node_modules/neo4j-driver-bolt-connection/lib/connection-provider/connection-provider-routing.js:69:12)
at RoutingConnectionProvider.Object.<anonymous>.RoutingConnectionProvider._applyRoutingTableIfPossible (node_modules/neo4j-driver-bolt-connection/lib/connection-provider/connection-provider-routing.js:729:16)
● 01. Initiate Driver › Driver has been instantiated
expect(received).toBeDefined()
Received: undefined
25 | it('Driver has been instantiated', () => {
26 | const driver = getDriver()
> 27 | expect(driver).toBeDefined()
| ^
28 |
29 | expect(driver.constructor.name).toEqual('Driver')
30 | })
at Object.<anonymous> (test/challenges/01-connect-to-neo4j.spec.js:27:20)
● 01. Initiate Driver › Driver can verify connectivity
expect(received).toBeDefined()
Received: undefined
32 | it('Driver can verify connectivity', () => {
33 | const driver = getDriver()
> 34 | expect(driver).toBeDefined()
| ^
35 | expect(driver.constructor.name).toEqual('Driver')
36 |
37 | driver.verifyConnectivity()
at Object.<anonymous> (test/challenges/01-connect-to-neo4j.spec.js:34:20)
Test Suites: 1 failed, 1 total
Tests: 3 failed, 3 total
Snapshots: 0 total
Time: 0.488 s, estimated 1 s
Ran all test suites matching /01/i.
gitpod /workspace/app-nodejs/src (main) $