Skip to content
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

TypeError: Cannot read property 'toLowerCase' of null #958

Closed
lstrzebinczyk opened this issue Apr 23, 2020 · 6 comments
Closed

TypeError: Cannot read property 'toLowerCase' of null #958

lstrzebinczyk opened this issue Apr 23, 2020 · 6 comments
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@lstrzebinczyk
Copy link

For a while now eslint fails to start in my vs code and is returning this error:

TypeError: Cannot read property 'toLowerCase' of null
	at Object.e.fromString (/home/killa/.vscode/extensions/dbaeumer.vscode-eslint-2.1.5/client/out/extension.js:1:60516)
	at b.refreshTrace (/home/killa/.vscode/extensions/dbaeumer.vscode-eslint-2.1.5/client/out/extension.js:1:54249)
	at b.initialize (/home/killa/.vscode/extensions/dbaeumer.vscode-eslint-2.1.5/client/out/extension.js:1:46842)
	at /home/killa/.vscode/extensions/dbaeumer.vscode-eslint-2.1.5/client/out/extension.js:1:46447

I did not do any changes, it just started failing. How would I fix it?

@dbaeumer
Copy link
Member

How does your setting file look like. I guess you have a "eslint.trace.server" setting with a value of null.

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Apr 23, 2020
@lstrzebinczyk
Copy link
Author

Allright, I did in fact have this, and when I removed it, this error is no longer occuring. Others are, but this must be after some changes on my side after all, and it looks like eslint 6.8 is acting out.
This looks like I should be able to get it to run from here.

If there is anything I can suggest here, is that the error message could have been clearer on this one. Thank you for your help : )

@dbaeumer
Copy link
Member

I should protect the code against null.

Will reopen the issue.

@dbaeumer dbaeumer reopened this Apr 23, 2020
@dbaeumer dbaeumer added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Apr 23, 2020
@dbaeumer dbaeumer added this to the 2.2.0 milestone Apr 23, 2020
@mikestopcontinues

This comment has been minimized.

@mikestopcontinues
Copy link

Actually, forget that, turned out it's a deeper issue with (I think) babel-eslint in my case. I just happened to use the same new syntax ?. in multiple open files.

@dbaeumer
Copy link
Member

Added code totday that protects against these null cases.

@dbaeumer dbaeumer modified the milestones: 2.2.0, 2.1.14 Oct 23, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants