"0:0 error Module Error [...]" when using with webpack
See original GitHub issueHello,
Using this in my package.json
file :
[...],
"babel-eslint": "^9.0.0",
"eslint": "^4.16.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-loader": "^2.1.0",
"eslint-plugin-import": "^2.8.0",
"webpack": "^4.17.1",
[...]
and this in my .eslintrc
:
{
"parser": "babel-eslint",
"rules": {
[...]
},
"globals": {
[...]
}
"extends": "airbnb-base"
It seems there is a bug when using webpack --mode development
(even in production mode). It returns me this:
./assets/javascripts/forum.es6
0:0 error Module Error (from ./node_modules/eslint-loader/index.js):
./assets/javascripts/global.es6
0:0 error Module Error (from ./node_modules/eslint-loader/index.js):
✖ 2 problems (2 errors, 0 warnings)
npm ERR! Linux 4.15.17-1-pve
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! humanoid-redesign@3.0.0 dev: `webpack --mode development`
npm ERR! Exit status 1
It’s not a problem with my es6 files: if I remove their content, the problem is still there.
If I remove the airbnb-base
line in my .eslintrc
config file, everything works fine.
Maybe it can be a problem with Eslint directly, but i’m really not sure after trying to remove airbnb-base
in my .eslintrc
file.
Thanks for any help with this.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
Failed to load resource error with webpack when using imports
I'm trying to bundle my webapp with webpack, but my files don't seem to be importing properly. things aren't working like did before...
Read more >How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >Code Splitting - webpack
Entry Points: Manually split code using entry configuration. Prevent Duplication: Use Entry dependencies or SplitChunksPlugin to dedupe and split chunks.
Read more >Cannot find module 'webpack' error | bobbyhadz
To solve the "Cannot find module 'webpack'" error, make sure to install webpack globally by running the npm i -g webpack command and...
Read more >Have a JavaScript Module Not Found Error ... - Airbrake Blog
This error comes from package bundlers, such as rollup or webpack. When building your application and bundling it for the web, these bundlers ......
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
This is entirely dependent on the development ecosystem. In the case here of webpack + eslint-loader it won’t stop the build but instead provide an error log message to the output or reporter.
@jaythomas what’s “wrong” is that your entire website stops working when you have a linting error, which introduces unnecessary friction, and encourages linting less so that it obstructs your build less - when in fact, you should be linting as much as possible.
You’re right about the order of the config keys 😃