Module not found: Error: Cannot resolve module
See original GitHub issueI’m probably missing a configuration property, but this is what I’m getting when trying to build. It happens only when I try to import the expect library.
Error in ./~/tmatch/index.js Module not found: Error: Cannot resolve module ‘\10.0.10.23\dev\node_modules\process\browser.js’ in M:\dev\node_modules\tmatch @ ./~/tmatch/index.js 1:0-89
My webpack.config.js:
module.exports = {
entry: './src/app.js',
output: {
path: __dirname + '/build',
filename: 'app.bundle.js'
},
module: {
loaders: [{
loader: 'babel-loader',
test: /\.js$/,
exclude: /node_modules/,
query: {
presets: ['es2015']
}
}]
}
};
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (2 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't resolve 'X' error in React | bobbyhadz
To solve the "Module not found: Can't resolve" error in React, make sure to install the package from the error message if it's...
Read more >Error: Can't resolve 'module' in '...' · Issue #5423 - GitHub
This line of code throws on error even in "node" target. If the current behavior is a bug, please provide the steps to...
Read more >Resolve | webpack
Resolve. These options change how modules are resolved. Webpack provides reasonable defaults, but it is possible to change the resolving in detail.
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 >
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
Closing due to inactivity.
Feel free to re-open at Stack Overflow.
Huh that is bizarre, looks like it is setup correctly. Since you are using ES6, maybe consider using the webpack 2 beta, since it seems to handle those statements a bit better natively, and the resolve setup is a little easier. I’m not sure if this will fix your issue but it might be worth a try. Here is a list of the changes in webpack 2 https://gist.github.com/sokra/27b24881210b56bbaff7. And here is a snip of how my webpack 2 resolve is setup: