opened
Ethan-Arrowood
username_0
Installed most recent stable version of neo4j-driver today and when I try to launch my app I get the following error message: `Module not found: Can't resolve 'dns' in '/Users/ethanarrowood/Documents/Wentworth/Semesters/Summer 2018/IndependentStudy/app/node_modules/neo4j-driver/lib/v1/internal'` (due note I'm using create-react-app and running the command `npm run start`)

I'll look into this issue and see if its just a bad publish or something else. Other recommendations would be helpful though.
v1 driver cannot resolve internal modules
issue
created
P1zz4br0etch3n
username_1
I also faced the problem using create-react-app and neo4j-driver@1.6.2. For me using `require` didn't solve the problem. But I found a workaround:
include the static web build (neo4j-web.min.js) in your index.html. Follow the docs about [public folder](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder) to do so and [global variables](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#using-global-variables) to access it.
I hope that helps.
comment
created
rambambulli
username_2
Hi Guys,

Other newbie here. I have the same problem when testing in StackBlitz. 
@username_1 would you be so kind to explain a bit more. 

Thanks!
comment
created
P1zz4br0etch3n
username_1
Using `window.neo4j.v1 ...` is even better cause then it is obvious that you're using a global variable intentionally and your eslint doesn't warn you.
comment
created
lutovich
username_3
Dear All,

Module resolution errors seem to be caused by runtime feature detection in the driver. It contains Node and browser environment specific components in one codebase which confuses bundlers. They can't determine that Node components are unused and obviously fail at compile time when trying to resolve required Node APIs.

Probably the best workaround right now is to include `neo4j-web.min.js` in `index.js` as suggested by @username_1 [here](https://github.com/neo4j/neo4j-javascript-driver/issues/396#issuecomment-411107571).

Mentioned PR should fix the problem and make it possible to use driver with a simple `import` or `require`. It will hopefylly go in 1.7 branch and be released in 1.7.0-beta02 available via `npm install --save neo4j-driver@next` pre-release channel.
comment
created
lutovich
username_3
Hello,

Pre-release 1.7.0-beta02 version of the driver with the fix is now released. It can be installed using `npm install --save neo4j-driver@next`. Please give it a try and let us know if there are any problems with it and Webpack. Thanks!
comment
created
P1zz4br0etch3n
username_1
Yep, now it works!
Thank you very much!
comment