-
Notifications
You must be signed in to change notification settings - Fork 847
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
npm and node don't work in wsl if launched in a single command #5251
Comments
Remove NodeJS from Windows system environment first. From what I experienced, Ubuntu WSL read windows system path too (If I read the error in WSL 2 - Failed to translate system path). |
That's not a viable solution for me. I need node in both environments. |
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Hi Can you resolve the problem? I have the same issues, Can you help me? |
It appears what is going on here (and elsewhere) is that folks are following the NodeJS on WSL guidance in the docs, which advises using
|
All of the replies above seem to be installing First of all note that since the Windows 10 Creators Update (build 1703, April 2017), we can natively run The problem is that all of these are The way I go around this is by running:
You will notice that with your We must create alias for these again if you want to use them through Full solution:
The reason we need the After restarting your terminal, you should be able to run |
Please fill out the below information:
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.18363.836]
From Windows cmd prompt, type one of the following:
wsl.exe npm --version
wsl.exe node --version
wsl.exe --exec npm --version
wsl.exe --exec node --version
wsl.exe -- npm --version
wsl.exe -- node --version
All will result in an error like this:
This appears to be trying to launch the Windows native version of the tools instead of launching inside the context of WSL.
detailed_logs.zip
The text was updated successfully, but these errors were encountered: