nvm-windows: NPM cli never gets installed
I am running version 1.1.7 and no matter what version of node I install the npm cli never get’s installed. I can see that node files but when I go to node_modules
it’s empty.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 19
- Comments: 15 (2 by maintainers)
I suspect this is because npm has moved their repository from https://github.com/npm/npm to https://github.com/npm/cli. When nvm attempts to download NPM it points to the old URL and fails.
I was able to work around this by manually downloading the npm release and copying it into the appropriate node_modules folder called
npm
.Then I copied the files
npm
andnpm.cmd
from node_modules/npm/bin into the parent directory of the node version I was trying to install (e.g. C:\ProgramData\nvm\v10.16.3).After that run
nvm use 10.16.3
(or whichever version you’ve installed) it should work. Or at least that’s what worked for me.Thanks @shiitake. That’s what I am doing too but it defeats the purpose of nvm.
Why is this ticket closed? This is still an issue.
Having the same problem, but I don’t think this is caused by the install files being unavailable. In the scenario below, there is no error message. The download is reported as complete, and the installation seems to be successful. However, directory C:\Program Files\nodejs\node_modules is completely empty.
Same issue here after installing
nvm
it reports that the installation ofnpm
is downloaded and succesful. However, the folderC:\Program Files\nodejs\node_modules
is completely empty. Although the following is present:In my case it was the network firewall of my company, which blocked the npm download URL. COnnecting mu PC to a personal network fixed the issue for me.
I personally give up. This is just too much. I am resorting to using Chocolately to mange my node installs on my Windows machine. I’ll use Windows sandbox (Win10 1903 and above) if I want to experiment with a different version of node.