-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
message.source can be null #29
Comments
hi @Julian can you provide a bit more context? not really clear from this output what was the command you were trying to execute. Can you provide a github repo with a minimum repro case? |
Hey @royriojas will assemble one, thanks for the response! |
@royriojas done: https://github.com/Julian/some-repo + (Which I got by running |
Thanks @Julian, will give it a try later today. |
Hey, I was able to reproduce the same bug by giving eslint the flag |
@royriojas I was able to reproduce this issue in the same way as @blacksun1. When there is at least one unused |
So what is the recommended solution for this issue? I'm suddenly running into this and don't really know how to fix it. |
Following up on my request, I've been able to get the project working with this:
to Which seems to do the trick. |
Addresses issue royriojas#29. Message source can be null when a Parsing error is encountered.
It is really weird as I was not able to reproduce the issue locally. But @exbinary has made a fix for this and will just publish a new version since tests pass with his change. Hope this helps to alleviate this issue. |
closing as we've published v4.0.1 |
Apologies if this is in the wrong place, I'm not a JS dev.
I think there's an assumption that
message.source
isundefined
or an object with alength
, but that doesn't appear to be the case. I was getting the below traceback, which, after inserting aconsole.log
, showed me thatmessage
was the object at the top:⠸ building for production...{ filePath: 'src/main.js',
ruleId: null,
fatal: true,
severity: 2,
source: null,
message: 'Parsing error: Cannot find module 'babel-eslint'' }
Hash: de4abf6558c690e13510
Version: webpack 3.10.0
Time: 1054ms
Asset Size Chunks Chunk Names
static/js/app.ac5f7a1782f171a9b60d.js 699 bytes 0 [emitted] app
static/js/manifest.98e4b6563f239cfa083a.js 1.46 kB 1 [emitted] manifest
static/js/app.ac5f7a1782f171a9b60d.js.map 1.07 kB 0 [emitted] app
static/js/manifest.98e4b6563f239cfa083a.js.map 14.2 kB 1 [emitted] manifest
index.html 352 bytes [emitted]
ERROR in ./src/main.js
Module build failed: TypeError: Cannot read property 'length' of null
at /Users/Julian/Development/Great/frontend/node_modules/eslint-friendly-formatter/index.js:185:74
at Array.reduce ()
at Object.module.exports [as formatter] (/Users/Julian/Development/Great/frontend/node_modules/eslint-friendly-formatter/index.js:160:17)
at printLinterOutput (/Users/Julian/Development/Great/frontend/node_modules/eslint-loader/index.js:79:29)
at Object.module.exports (/Users/Julian/Development/Great/frontend/node_modules/eslint-loader/index.js:213:3)
Build failed with errors.
The text was updated successfully, but these errors were encountered: