Webpack 3 can't resolve 'fs' and 'net'
See original GitHub issueI updated to Webpack 3, if I add the plugin in resolve’s plugins list I have this error in console.
Module not found: Error: Can't resolve 'fs' in '/MY-PROJ-DIR/node_modules/debug/src'
@ ./node_modules/debug/src/node.js 184:15-28
@ ./node_modules/debug/src/index.js
@ ./node_modules/sockjs-client/lib/main.js
@ ./node_modules/sockjs-client/lib/entry.js
@ (webpack)-dev-server/client/socket.js
@ (webpack)-dev-server/client?http://localhost:8080
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server react-hot-loader/patch webpack/hot/only-dev-server ./src/index.js
ERROR in ./node_modules/debug/src/node.js
Module not found: Error: Can't resolve 'net' in '/MY-PROJ-DIR/node_modules/debug/src'
@ ./node_modules/debug/src/node.js 191:16-30
@ ./node_modules/debug/src/index.js
@ ./node_modules/sockjs-client/lib/main.js
@ ./node_modules/sockjs-client/lib/entry.js
@ (webpack)-dev-server/client/socket.js
@ (webpack)-dev-server/client?http://localhost:8080
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server react-hot-loader/patch webpack/hot/only-dev-server ./src/index.js```
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Module not found: Error: Can't resolve 'fs' in - Stack Overflow
I found a possible solution, that you have to put some configuration in one of the node_modules. But I think that is not...
Read more >Can't resolve 'fs' when bundle with webpack #447 - GitHub
I got this error when using the "fetch" library from npm. At first I got the same error but with other packages (...
Read more >Can't resolve 'fs' error in Next.js and WebPack - Nsikak Imoh
The Module not found: Can't resolve 'fs' in Next.js error occurs when you import a Node.js module that is not available in the...
Read more >webpack module not found: error: can't resolve 'fs' - You.com
For a frontend/web project, add the socket.io client libary to your app bundle. There is no need to include any node dependencies (...
Read more >Error: Can't resolve 'fs' in (Webpack 5.72.0) - CSDN博客
报错:ERROR in ./node_modules/handlebars/lib/index.js 17:11-24Module not found: Error: Can't resolve 'fs' in ...
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 FreeTop 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
Top GitHub Comments
Looks like
sockjs-client
willrequire
moduledebug
if it not PROD env which tries to detect and ends up importing the file forNode.js
instead of browser. Can you try to specifyhonorPackage
option to look for browser first?Please let me know if this works.
Hi @shaketbaby, I was having the same problem here. The
honorPackage
has resolved the issue.