Skip to content
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

NVS with WSL2 and Permission Errors #191

Closed
ZachHandley opened this issue Mar 28, 2021 · 2 comments
Closed

NVS with WSL2 and Permission Errors #191

ZachHandley opened this issue Mar 28, 2021 · 2 comments

Comments

@ZachHandley
Copy link

After searching and trying the solutions presented in the previous thread (closed #139 ) I can't seem to fix my installation of NPM with Windows 10

When entering npm on WSL2 Ubuntu I get the following https://i.imgur.com/XA2hs6X.png

/c/Users/zachh/AppData/Local/nvs/default/npm: 11: exec: node: Permission Denied however I can't use sudo as it's not installed on Linux.

It was working originally, but after trying to install Truffle globally it broke and just gave me permission denied

I tried following the steps in #139 but nothing worked, also tried reinstalling nvs, refreshing the links, etc. nothing seems to be working

@jasongin
Copy link
Owner

/c/Users/zachh/AppData/Local/nvs

Based on that path, it looks like it is trying to use a Windows installation of nvs from within WSL2. I'm not sure if that's possible, but anyway it's not something that is intended to work. Even if it did work, it would run the Windows version of node / npm, which is probably not what you want from within WSL2.

Instead you should separately install nvs on WSL2 using the Linux installation instructions. Also make sure the PATH variable in WSL2 does not include any Windows nvs paths, to prevent confusion.

@ZachHandley
Copy link
Author

ZachHandley commented Mar 29, 2021

So the reason I was pursuing installing it on Windows was because Android SDK Emulator and Ganache (for Blockchain Development) require NodeJS on Windows to hook in, so I wanted to run one NodeJS installation. I ended up installing default nodejs and aliasing npm, node and npx to powershell.exe npm etc. and it works quite well :)

Thank you for the help! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants