v1 driver cannot resolve internal modules
See original GitHub issueInstalled 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 '/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.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
create-react-app causes missing dependencies dns and ...
js Module not found: Can't resolve 'dns' in '/Users/erg/my-app/node_modules/neo4j-driver/lib/v1/internal' This error occurred during the build ...
Read more >Error: Cannot find module 'neo4j-driver/types/v1'
Cannot find module 'neo4j-driver/types/v1'. is generated in internal/modules/cjs/loader.js when trying to run my node server.
Read more >BitLocker cannot encrypt a drive: known TPM issues
This article describes common issues that affect the Trusted Platform Module (TPM) that might prevent BitLocker from encrypting a drive.
Read more >Node server setup shows error "can not find module" - Support
Cannot find module 'core-js/library/fn/get-iterator' Error trying to install Chromedriver binary. Waiting and trying again.
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
To fix the error, you need to install the package that is absent in your project directory – npm install package-name or yarn...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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!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
inindex.js
as suggested by @P1zz4br0etch3n here.Mentioned PR should fix the problem and make it possible to use driver with a simple
import
orrequire
. It will hopefylly go in 1.7 branch and be released in 1.7.0-beta02 available vianpm install --save neo4j-driver@next
pre-release channel.