Module not found: Error: Can't resolve 'module' in '...'
See original GitHub issueDo you want to request a feature or report a bug? bug
What is the current behavior?
const module = require('module')
// Module not found: Error: Can't resolve 'module' in '...'
This line of code throws on error even in “node” target
If the current behavior is a bug, please provide the steps to reproduce.
just requiring the module
module will cause the issue.
What is the expected behavior?
module
is a native module in node, just like fs
or http
, webpack should not throw when its required.
If this is a feature request, what is motivation or use case for changing the behavior?
I need to use the module
module!
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
latest webpack version, nodeJS 8.1.3, mac OSX
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Module not found: Error: Cannot resolve module
In nodejs, when you call require("script1.js") it won't search in the current folder. You have to use require("./script2.js") , to specify ...
Read more >Module not found | Can not resolve module in react - YouTube
React Course For Beginners - Learn React in 8 Hours · JS - JavaScript · Target container is not a DOM element error...
Read more >How to fix 'Module not found: Can't resolve 'http' in ... - YouTube
Your browser can't play this video. ... How to fix ' Module not found : Can't resolve 'http' in ...' error with FCL...
Read more >Resolve
Configure how modules are resolved. For example, when calling import 'lodash' in ES2015, the resolve options can change where webpack goes to look...
Read more >Error: cannot find module [Node npm Error Solved]
In my case, I got it like this "Module not found: Error: Can't resolve 'react-icons/fa' in 'C:\Users\user\Desktop\Projects\Address Locator\ ...
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
Any updates here?
Getting this error:
Module not found: Can’t resolve ‘module’ in ‘project_root\node_modules\load-grunt-tasks\node_modules\resolve-from’
@sokra can you elaborate on the reason?