Open MithicSpirit opened 4 years ago
npm update -g
(the actual command you ran) doesn't actually work for global packages the way you think it should (i think there's an open issue on npm about it). It's best to use npm install -g
, for each package, explicitly (npm ls -g --depth=0
to list them).
Separately, the error seems like it's a bug in WSL - I'd suggest filing an issue there (https://github.com/microsoft/WSL/issues/new/choose), or perhaps in npm. Once nvm has installed and activated a node version, it's not really involved after that :-)
Operating system and version:
Ubuntu 18.04.4 (WSL)
nvm debug
output:nvm ls
output:How did you install
nvm
?Install and update script from readme:
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
What steps did you perform?
I only ran
npm -g upgrade
What happened?
I got the EACCES -13 error:
What did you expect to happen?
I expected it to upgrade any packages that might be out of date, and not throw any errors, especially given that the reason I began using nvm was to solve this very issue (as npm docs explain here).
Is there anything in any of your profile files that modifies the
PATH
?Yes:
export PATH="/home/mithic/.local/texlive/2019/bin/x86_64-linux:$HOME/.local/bin:$HOME/bin:/usr/local/bin:$PATH"
Additionally, since I am using WSL it also uses the PATH from windows (the full path can be seen in the
nvm debug
output above). I do not believe this to be part of the issue as all of the directories seem to be the correct one.