Vscode-eslint: Request initialize failed with message: Cannot read property 'trim' of null Code: -32603

Created on 15 Sep 2016  路  8Comments  路  Source: microsoft/vscode-eslint

Server initialization failed.
Message: Request initialize failed with message: Cannot read property 'trim' of null
Code: -32603

My Troubleshooting steps.

I made some significant changes this morning:

  • Updated to ESLint 3.5
  • Updated to eslint-config-airbnb 11.1.0
  • Updated this plugin from 1.0.3 to 1.0.5.

I didn't notice eslint wasn't working in vscode until all my changes were completed and I restarted vscode (Insiders) so I don't know which of my changes may be causing the problem. I tested in the non-insiders build and I'm getting the same error. I tried backing out my changes, but I was still receiving the same error.

I also attempted to set up the dev environment to debug the server and client, but I ran into some problems.

  • eslint-server timed out connecting. Could be that I need to set the port launch.json, but I don't know what to set it to.
  • setting breakpoints in eslint would cause an "Extension Host did not start in 10 seconds, it might be stopped on the first line..." warning in the Extension Development Host. This would happen even though none of my breakpoints were hit and the debugger was not paused. If I launch without any breakpoints then the app runs fine, but I still get the Server initialization failed message.

Lastly I thought I would revert to eslint 1.0.3, but so far I haven't been able to figure out how to download/install it from the marketplace.

Most helpful comment

Yes, I confirm. It resolved the issue. Thanks!

All 8 comments

I pulled an older copy from my coworker's machine (0.10.15) which is working correctly.

I'm getting the same error. I've just fresh installed it.

Same problem. Any way to fix this?

Me too.

Sorry for that. It is a bug in the new module resolution code. Can someone of you what you output is if you run npm config get prefix in a terminal. I will add some protection code and push a new version.

I am seeing the same issue. The local project specific eslint from workspace is no longer resolved. I don't have node/npm in my $PATH as I am using nvm. I only activate node after launching vscode (from embedded terminal).

However, following works:

$ nvm use 6.5.0
$ code .

In this case, node/nvm and globally installed eslint is in $PATH and works fine.

I published a new version that should fix this. The problem was that npm config get prefix failed which I didn't expect. The actual fix was in the vscode-languageserver npm module.

Version is 1.0.6

Yes, I confirm. It resolved the issue. Thanks!

Was this page helpful?
0 / 5 - 0 ratings