-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
The global npm directory is not put in the environment variable #391
Comments
Actually maybe this is me misunderstanding how nvm-windows is supposed to work. Can someone clarify, is nvm-windows supposed to put my global npm packages (eg. yarn, ng) into c:\users\admin\appdata\roaming\nvm? It looks to me on my computer, the global packages are put in c:\users\admin\appdata\roaming\npm - only the node versions are put into c:\users\admin\appdata\roaming\nvm. This is why the global commands do not work until I add c:\users\admin\appdata\roaming\npm into SYSTEM PATH. |
No it is not. That is the right behavior you are experiencing. Also nvm adds the |
Ok well it didn't add the It added NVM_HOME which linked to c:\users\admin\appdata\roaming\nvm and i could access npm because c:\program files\nodejs was pointing to my current version of node (eg. C:\Users\admin\AppData\Roaming\nvm\v10.10.0) |
I was getting this issue but realised this hadn't run this sucessfully
I think this explains the path not set. Anyway installed nvm 1.17 and successfully run the above - it adds these env vars which get appended to the path env var
npm is seen by the path and I stop getting the error mentioned in this thread |
I thought I would repeat the above on the laptop supplied by my client
Any advice on how resolve this or perform a manual install. |
I had Nodist installed prior to nvm-windows. It left a |
I don't know that my path had anything incorrect or missing, but re @ismailkattakath's solution, I also had extra Edit: on windows 7. For which the extras installs fails (and I got chocolatey installed through manual wrangling) because it is coded for powershell 1 but chocolately now requires TLS2 and powershell 5 to install. I wonder if the extras installs failures created |
It appears nvm places commands in C:\Program Files (x86)\Nodist\bin. Adding that to path solved the issue for me. May be nvm installer can add that dir to the path |
@coreybutler This problem is still unfixed. I experienced this on nvm 1.1.9 on Windows 11, after using nvm to install Nodejs 18.7.0. It was not previously installed. The |
If this is a question about how to use NVM4W, please use stackoverflow instead.
If this is an issue regarding antivirus, make sure you search the existing issues first.
My Environment
Windows 7 or below (not truly supported due to EOL - see wiki for details)
Windows 8
Windows 8.1
Windows 10
Windows 10 IoT Core
Windows Server 2012
Windows Server 2012 R2
Windows Server 2016
My Windows installation is non-English.
I'm using NVM4W version:
I have already...
My issue is related to (check only those which apply):
Expected Behavior
After I install nvm-windows, the C:\Users\admin\AppData\Roaming\npm that contains all my global commands should be added into PATH variable but this is not.
Actual Behavior
This is not - I have to manually go and add this directory to PATH variable
Steps to reproduce the problem:
Install nvm-windows
run npm install -g @angular/cli
close powershell window and re-open
run "ng new newProject"
It's going to say it "ng is not recognised command"
Go into environment variables, and add "C:\Users\admin\AppData\Roaming\npm" to PATH
Open another powershell window, and run "ng new newProject", it'll now work
The text was updated successfully, but these errors were encountered: