Connecting to external DB using neo4j-driver through backend

Referred to

  1. External DB connection in Wix: https://www.wix.com/corvid/forum/community-discussion/best-way-to-retrieve-data-from-an-external-mysql-db
  2. Neo4j usage example ( page 4 ): https://neo4j.com/docs/pdf/neo4j-driver-manual-1.7-javascript.pdf

I am trying to connect to external Neo4j DB but I was met with following error.

It seems like neo4j can be loaded but neo4j. auth is undefined. I have tested the JS code ( page 4 of the Neo4j usage example ) in WebStorm and it worked. Could it be package error?

You can make it a little bit easier for yourself and look at using their own npm through Wix Package Manager.
https://support.wix.com/en/article/corvid-managing-external-code-libraries-npm-with-the-package-manager
https://support.wix.com/en/article/corvid-using-external-code-libraries-from-npm

Since the version is 1.7.4, use the following instead (Client applications - Neo4j Driver Manual).

const AURA_ENDPOINT = “bolt+routing://xxxxxxxx.databases.neo4j.io:7687” ;
const driver = neo4j. driver (AURA_ENDPOINT , neo4j. auth .basic (USERNAME , PASSWORD) , { trust : ‘TRUST_SYSTEM_CA_SIGNED_CERTIFICATES’ } ) ;