Hi everybody.
I’m simply trying to use webpack but i can’t solve this error.
This is my webpack.config.js :
module.exports = {
entry: './index.js',
output: {
filename: 'bundle.js'
}
};
I try many thing but nothing change… I’m using last version of webpack 1.8.4.
I got this error :
Running "webpack:build-dev" (webpack) task
Version: webpack 1.8.4
ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' ./index.js in D:\myApp\src
Warning: Task "webpack:build-dev" failed. Use --force to continue.
index.js file is in src folder…
Anybody got an idea ?
Invisible char issue, not evaluate by npm but cause problem for webpack. Encoding matter.
I have a similiar issue. Could you please add some more info on the solution?
Try running
webpack --display-error-details
. The error may not be related to file resolution.Had this error today. I’m commenting here because this is the first hit in Google with the error message.
There was nothing wrong with my
webpack.config.js
but there was a syntax error in mypackage.json
which caused this. Better error message would be cool.This error has been seen here too ryanclark/karma-webpack#33
wow thanks @jgebhardt –display-error-details saved my bacon
I had the same error, help me
Thanks @epeli! Spent a while looking through my gulpfile.js when I had a comma on the last item in my devDependencies in package.json
Terrible error message
For those arriving by search: I had this issue because I was using
html-loader
in my webpack config, and hadrequire
s prefixed withhtml!
. This caused my options in the config to get ignored for every file.resolve by this : http://webpack.github.io/docs/configuration.html#resolve-extensions
Why does not webpack print such obvious errors as unability to parse package.json?
my package.json was corrupted and webpack gave me mysterious errors about unability to resolve absolute path…
npm install file-loader
fixed the issue for me.I have the same problem beacause of my package.json got a syntax error 🙂
"scripts": { "FIXFIX": "webpack --progress --profile --colors --display-error-details --display-cached", },
sudo node run FIXFIX
I think it has to do with the new webpack version where you have to specify “resolve”.
My project didn’t work until I added it this line:
resolve: { modulesDirectories: ['node_modules', 'src'], extension: ['', '.js', '.scss'] },
wtf. Had this error because I had one line commented out. with /* … */. Is webpack kidding me?
I had the error because this:😵
extenstions: [ '', '.js', '.jsx' ]
.