-
Notifications
You must be signed in to change notification settings - Fork 325
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
request: better error message if eslint crashes #391
Comments
In case anyone else ends up running across that eslint issue, it was because I had updated from eslint 3.x to 4.x without updating from babel-eslint 7.x to 8.x. This fixed the eslint crash for me: Would still be great to have that vscode error more verbose to help narrow down the problem faster. |
Thanks for the great analysis. I add the code. Please have a look at this commit. If OK I will publish a new version. |
Looks good and works. Thanks! |
I started noticing an initially inexplicable error in vscode.
After updating from eslint 4.13 to 4.14, when I open a js file in vscode, the following error pops up: "Error: Cannot read propery 'type' of undefined [close]"
That's at the top of the editor window, and there's no obvious way to find out more information, so for a while I had no idea where the error came from.
Eventually I narrowed it down to the eslint vscode extension, and then I realized it was actually (apparently) the first part of the error that is being reported when I run eslint on the command line, which is crashing (that's a separate issue I'll file upstream).
My suggestion for eslint extension would be to improve the error code if eslint crashes, and say something like
eslint command crashed: Cannot read property 'type' of undefined
with an option to view the full crash message. That way, users would know to start looking at eslint command itself rather than digging around in vscode (or mistakenly thinking it is something caused by C++ extension, for example, from this issue - microsoft/vscode#37677).The error from the command line is below:
The text was updated successfully, but these errors were encountered: