tsserver shows 'No such file or directory' error for npm path
See original GitHub issueTypeScript Version: 2.8.3
Search Terms: npm "No such file or directory"
Code
Run following command from terminal:
$ tsserver
Expected behavior:
tsserver
starts without any errors or warnings.
Actual behavior:
Following error is shown in stderr:
/bin/sh: /usr/local/Cellar/node/9.4.0/bin/npm: No such file or directory
Playground Link: N/A
Related Issues: None
This is a problem related to detecting default npm
path in tsserver
. At least Node v9.4.0 does not install npm
to the same directory as node
command. It is installed in /usr/local/lib/node_modules/npm
like other normal npm packages.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:6 (3 by maintainers)
Top Results From Across the Web
What could cause an error related to npm not being able to ...
Open command prompt , go to path angular folder and run Yarn. Run angular\nswag\refresh.bat. Run npm start from the angular folder.
Read more >Npm no such file or directory
ENV NODE_ENV=production WORKDIR /app COPY ["package. . x. C:\Users\PC>npm install npm ERR! path C:\Users\PC\. Then run, C:\Users\Nuwanst\Documents\NodeJS.
Read more >Common errors | npm Docs
You are trying to install on a drive that either has no space, or has no permission to write. Free some disk space...
Read more >lsp-mode can't find npm : r/emacs - Reddit
... it outputs this error: [tsserver] /bin/sh: /opt/local/bin/npm: No such file or directory ... Above path is in my .env and emacs config....
Read more >jsconfig.json Reference - Visual Studio Code
The presence of such a file in a directory indicates that the directory is the root of a JavaScript project. The file itself...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
same issue on my end, it tries to find npm in
[tsserver] /bin/sh: /opt/local/bin/npm: No such file or directory
but itβs in/usr/local/bin/npm
It should work. But making users create a symlink in system directories is not a fix for this issue, I think.