-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Doesn't install NPM #766
Comments
Are you using an old version of NVM4W? This was fixed in version 1.1.7 (and above). |
I take it back. I had not installed my node version first. @ddcado I did |
You have to : |
@coreybutler I have found that 1.1.9 does not install nvm 1.1.7
nvm 1.1.9
No "Downloading npm" |
I have the same issue. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Stale because noone has fixed it, not because noone wants it fixed. |
@WORMSS The "Downloading npm" message does not appear because web.go added additional logic to the GetNodeJS function from v1.1.7 -> v1.1.9, where the additions can be seen in the else block snippet: Lines 139 to 186 in f792f4e
Lines 144 and 152 check if the url has the .zip suffix, and if it does, then the function will extract both NodeJS and npm. The code to determine the node url is in getNodeUrl: Lines 253 to 275 in f792f4e
Lines 263-274 shows that if the node version we are trying to download is >= corepack (here it is 16.9.0), then we will change the url to incorporate the aforementioned zip file. Here are screenshots detailing this in action and verifying that npm is still being installed for node.js versions >= 16.9.0 npm installs fine on both node.js versions, but a message that signals to the user that npm is in fact actually being installed would be useful! |
Yeah, just too many things are weird in 1.18 and higher. Things just not working and so on.. |
EDIT: Closing and reopening the command prompt terminal seems to have resolved the issue for me It seems to be an issue of nvm not 'switching' rather than not installing. On Log of attempts to uninstall/reinstall:
|
The problem remains unresolved |
This is still an issue, NPM is not installed... Which kind of, completely, breaks things. on 1.1.9 no erorrs, just doesn't try and install NPM at all. On 1.1.8 it seems to try, and fail:
NVM will always say there is another process accessing the file, even after a fresh restart. I can freely go in and delete it. Unfortunately there are no builds at https://github.com/npm/cli/releases/tag/v6.14.17 just source code bundles... If I extract that into the dir as instructed, it still does not work. If I copy the executables from There is no npm executable in the install dir: |
Has anyone gotten this working on their device? If so, how? |
It's probably failing to install because the download fails, because this path: https://github.com/npm/cli/archive/v6.14.17.zip Returns: |
Same issue |
For example, if NVM4W is installed at In the case of npm 6.14.2, it's just a bad link (as @douglasg14b pointed out). See #799. |
Hi folks, I came across this issue and none of the other suggestions were working, such as Enabling Developer Mode or running NVM from a privileged prompt.
Edit: scratch that - What worked was installing node 14.0.0. For some reason, when you try to run NVM Install on that version you get no errors. I will try to see how high I can go without problems and post back here my findings |
Ok, just finished my experiment. The NPM Install problem begins when trying to install Node v14.19.2. Installing Node v14.19.1 with NVM works without problems. I ran this experiment on NVM 1.1.7
|
I can confirm pedroyan observations. nvm 1.1.9 14.19.1 works
|
Problem is that the URL |
The second problem is that this tool is written in Go, and most of the developers looking for a fix are NodeJS developers. |
Can confirm the URL problem seems to be the real culprit |
you can check that NPM is installed with the version you chose to install from this directory |
The issue was the URL. When a Github project has a branch and a tag with the same name, Github returns an HTTP status There is also a specific error handler to work around this particular version of npm, since it appears to be the only version affected by this problem. If the invalid URL for npm 6.14.17 is detected, NVM4W will automatically rewrite the URL to the appropriate endpoint. I am not fond of these kinds of hacks, since they are brittle and can break again if the upstream endpoint changes again. This will be a part of v1.1.10, which will be released after I've had a chance to incorporate a few more PRs. |
Okay I am not sure if it has been mentioned, but I have a workaround for now...
My experience I found that C:\Users\MyUsername\AppData\Roaming has two folders npm and npm-cache. I renamed them to npm.1 and npm-cache,1. This gives me access to npm again. What I am suspecting and correct me if I am wrong the roaming folder is where my global settings are stored as I noticed when I rename those folders it then looks at my Program Files Node folder. I have multiple projects running atm that requires met to switch between Node 10.16.0, 10.18.0 and 16 hence why I would like to just understand why this work around is working. When I switch between 10.18.0 and 16 and 18 I can use npm but when I switch back to 10.16 I had to redo the rename workaround. I hope this helps someone in dire need like it helped me as I have access to my different versions in nvm and access to npm |
For those finding this issue for npm 6.14.17, there was an issue upstream in the npm github reo that has been fixed: npm/cli#4890 (comment). |
…' and 'install' commands. Closes #766.
and i have thesame issue now |
This has not been a issue for many years. If you have all the latest version's of NVM, it would be worth creating a new issue with all the relevant information such as OS/NVM version/paths trying to use/etc |
I use nvm to install node on windows as recommanded by microsoft.
After, npm wasn't install.
I saw that the npm mirror by default is "https://github.com/npm/cli/archive/" but this page doen't exist any more "err 404 not found"
I don't know what is the good uri....
I finally used node.js msi from the node js.com.
Kind regards.
The text was updated successfully, but these errors were encountered: