'Error starting TypeScript language service in WebStorm 2018

I'm new to using WebStorm (v2018.2 on Windows 7) and trying to work with TypeScript. And I am getting following error, despite trying many combinations of the TypeScript configuration settings in WebStorm.

Error:Timeout on starting language service process

As a result, I'm unable to compile my .ts files within the IDE.

TypeScript is working fine from command line (i.e. successfully able to run tsc to compile .ts files).

I have thoroughly reviewed the WebStorm help documentation and other tutorials, but nowhere have I seen this error mentioned or how to resolve it.



Solution 1:[1]

I've encountered this error a few times myself, and in my case it seems to be a problem with the node interpreter WebStorm is trying to use.

Earlier this week something I had installed via mac's homebrew package manager added a new/broken build of node to my system as a dependency. When I started having issues with webstorm, I opened preferences > Languages & Frameworks > TypeScript and saw that the Node interpreter was set to /usr/local/bin/node instead of my usual nvm path. I opened a terminal and tried running the node executable it was pointed to, and found that it was throwing an error.

A lot of the specifics aren't really comparable to your situation since you're on Windows, but I think it's probably a similar root cause, a bad node executable is the only thing I've ever seen cause this error message.

Solution 2:[2]

Just go to Typescript in settings sidebar, and you reference the correct path of node interpreter in node interpreter input that you see there

Solution 3:[3]

I had same issue. Problem was setting current node interpreter version in intellij (Settings->Languages&Frameworks->NodeJS and NPM)

Solution 4:[4]

I got this error in an Angular TypeScript project. ESLint was linting .ts files obviously. However, I also had some HLS video chunks in my project which also use a .ts extension. When I deleted the HLS chunks, the problem disappeared. I tried adding the folder containing the HLS chunks to .eslintignore but no joy. I'm still refining how to deal with the issue without deleting the HLS chunks. I may be forced to change the extension of the chunk files but hoping I can find a better solution.

Solution 5:[5]

Had this problem. Found out the reason was that I had a package.json file in my home folder that node used by default and it messed things up. Had to delete ~/package.json file and problem was solved.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kai Mollerud
Solution 2 Georges Feungap
Solution 3 Piotr Krogulec
Solution 4 danday74
Solution 5 user3761308