-
Notifications
You must be signed in to change notification settings - Fork 148
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
Could not determine npm prefix: [WinError 2] The system cannot find the file specified #1004
Comments
I believe this should be solved with #955 which will be available in the next jupyter-lsp version. |
Great. Strange that that issue wasn't obvious when I googled it first, but still -- great. Thx. |
Tnks man, it helped, i mean adding .cmd to this part ....["npm.cmd", "prefix", "-g"].... as you have explained. |
Thanks for the solution, it really works! |
This fixed an annoying issue I'd been having for months. Thanks! |
Thanks!!! |
1 similar comment
Thanks!!! |
I'm not a dev so I hope the following suffices to be useful:
Windows 10
IPython : 8.16.1
ipykernel : 6.25.2
ipywidgets : 8.1.1
jupyter_client : 8.4.0
jupyter_core : 5.4.0
jupyter_server : 2.8.0
jupyterlab : 4.0.7
nbclient : 0.8.0
nbconvert : 7.9.2
nbformat : 5.9.2
notebook : not installed
qtconsole : not installed
traitlets : 5.11.2
with jupyterlab-lsp==5.0.0 jupyter-lsp==2.2.0 python-lsp-server[all]
on startup, the console kept saying "Could not determine npm prefix: [WinError 2] The system cannot find the file specified"
It's not that npm is missing, it's because WIndows isn't Linux; see here
I resolved the problem for myself: in C:\Users\Julian\anaconda3\envs\PlainPY\Lib\site-packages\jupyter_lsp\types.py
In the class LanguageServerManagerAPI, change _npm_prefix to be
i.e. add ".cmd" to npm: the error wasn't saying the prefix couldn't be found, but rather it couldn't invoke npm in the first place,
Obviously that's not a fix for everyone, it's windows specific.
The text was updated successfully, but these errors were encountered: