-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Issue]: nvm install 12 fails #1179
Comments
This just happened to me as well (using nvm 1.1.12) with multiple versions:
I could successfulyy install 16.20.2 |
@cope @joycehorn are either of you behind a proxy? That error message only displays when the remote download server responds with an unknown HTTP status code (see here). |
@coreybutler No, not behind a proxy. The interestng thing is I was able to install v16 and v10 without errors, but could not make it work with versions 13, 14 and 15. LTS laso installed fine. |
@joycehorn did you try all of those installations at approximately the same time? While it doesn't happen often, there are rare occasions where the download server isn't actually available. I noticed that some of the old versions of Node have updated timestamps on them (and their checksums) from just a few days ago. Again, it is rare, but it is possible the remote server wasn't responding properly during a push/update. |
Just tried 14.21.3 again right now, failed again. Tried 18.20.1 and worked.
|
I am experiencing a similar issue. Here is another data point. Failing to install v8.11.0
Successfully installing v18.17.1
This just started today. We observed our first failure at 12:37pm ET and has been failing ever since. |
I'll have to dig into this a little deeper. Unfortunately though, my brand new Windows machine BSOD'd and corrupted the hard drive. I'm waiting for a replacement. I can dive deeper when I have a working machine again. |
I also can't install anything older than Node 16. Getting the same error as mentioned above. |
@coreybutler I think I found the bug. Basically, in this code snippet, the version prefix variable gets assigned a value with a slash at the end. Then here the URL gets built, but notice the additional slash in
But then further down in the same function the URL for Node 19 gets rebuilt to I've just removed the slash in first If you want, I can open a PR with the fix. Maybe #580 was happening because of the same bug? |
@stefan-ptrvch just glancing at your fine sleuthing, that makes sense. I think #580 had several causes, but I wouldn't rule this out as being one cause for some people using older versions. If you're willing to PR a patch, that would certainly help speed up the process. I have quite a few updates to get through (the next release will be bumped to 1.2.0) once my Windows computer is working again, so any help would be appreciated! |
Very nice work, guys. |
Hvala buraz 😁 @coreybutler I've opened the PR and I'll also link a build here with the bugfix included if someone wants to download it before v1.2.0 gets released (not sure if this is inappropriate or something, please let me know if it is). https://github.com/stefan-ptrvch/nvm-windows/releases/tag/v1.1.12-bugfix |
Thanks @stefan-ptrvch! I'm fine with having the download... encouraged actually. I want people to have a workaround until 1.2.0 can be released. This appears to be that workaround, so thank you very much. |
@cope - correct. That's the tradeoff for the moment. The next release (v1.2.0) will be code-signed with a new certificate and a new steward. Historically, this project was "officially" maintained by my holding firm (Ecor Ventures LLC). Earlier this year, I created a new company dedicated to support this effort (Author Software Inc) and its successor (Runtime). I've worked closely with Microsoft on this transition. They changed their policies/algorithms for SmartScreen back in January, but Microsoft has verified Author Software and I believe SmartScreen filters will not pop up on new releases. |
I can confirm that the build @stefan-ptrvch made fixed this issue was for me. Thank you! |
@mihai-mihailescu Very welcome! Glad to have helped! |
Hello, I am experiencing the same problem when I want to install node version 11.9.0. I already tried using nvm version 1.1.10, 1.1.11, and 1.1.12 but still get the error message like this:
update: |
I was having same issue with version 14 and @stefan-ptrvch solution fixed my problem thx |
@stefan-ptrvch's bug fix release has fixed the issue. Thanks a ton as this was a blocker for me |
this patch fixed the problem on my Windows 11 x64. thanks a lot for the patch. |
Hvala @stefan-ptrvch Issue fixed. |
Hello, I was also having this issue, trying to install node 4.0.0 and 0.12.1 while using nvm 1.1.12. |
@stefan-ptrvch Thanks so much for fixing this, we've been having all sorts of issues on our CI recently and on local dev envs. I can also confirm that the fix works. I note that it identifies itself in the installer and via |
@chris-grabcad Thanks for pointing out the version. I've built the master branch, which is a bit newer than v1.1.12, but I think the version number hasn't been updated in the code since v1.1.11 (see here). |
Warning. The patch above contains Win/wacatac.h!ml virus signature. |
@rebeccapowell I think that's a false positive due to the build not being signed, since I don't have a certificate. There's a discussion about it above. By the way, the PR for this was merged into |
@coreybutler, is it possible to roll out a signed release with this patch, before the next release (v1.2.0) comes out? |
@edgilman no - the signing certificate expired. I have a new process in place already (w/ new certs), but it is associated with a new legal entity (Author Software Inc.). I've only loosely followed semver on this repo, but a change in stewardship is a significant enough change to warrant a minor version bump. As @stefan-ptrvch mentioned, I merged the PR this morning as well as several others. Luckily I was able to acquire a temporary Windows computer, so I am doing what I can to get 1.2.0 released. It may still take some time though. I have to configure the repo to work with the new remote code signing process. The upside is this project will finally shed the dependency on a manual build process. |
Hi guys quick question how can I do @stefan-ptrvch working patch if my computer keeps deleting all its files due to the lack of a signing certificate, how did you install it so windows doesn't take it as a trojan? maybe my question is very basic but if any of you could give me a hand I would be very grateful. |
@AlejandroGCorzo if possible, add an exception to your antivirus. Also be mindful that Microsoft Controlled Folder access can also delete files. |
Also, since my primary focus is on Runtime (the successor to this project), I'd really love to know why so many people are using old versions of Node. Is it all about legacy app support or is there some other reason? |
I have a project for a customer from 2019. that I still support but don't actively work on, and it uses a Vuejs template that's Node 14 based. |
in my case I use it for applications in my work that were created with older versions of node and I need to change node version depending on the repository I work with. Thanks for the advice in the end I had to do what you suggested to install it @coreybutler and thanks to @stefan-ptrvch for the fix |
@AlejandroGCorzo Very welcome! This is actually my first open-source contribution, and it's been a very exciting couple of days. I think I might start doing it more! I also recommend others to try it! |
Visual Studio 2022 still installs a really old node.js version with gulp 3.0.0 for the task runner explorer, which results in a primordials error when trying to run commands due to its dependency on graceful-fs. This is even with a clean install of node.js. The only viable solution seems to be to temporarily downgrade node.js when you need to. I was following this guide from Microsoft: https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows I even ran the patch binary through virustotal beforehand and checked out the code diff, so I was completely confused as to the virus warning from Windows Defender. |
The fix doesnt work for me unfortunatley. However, it works fine if I download the zip file from https://nodejs.org/en/download/releases and extract it to the nvm location, then use nvm to install it. |
@mejobloggs-cw are you getting the same error originally posted or something else? |
I got the same error originally posted at work ( legacy apps ) and as I could not use the fix that @stefan-ptrvch did because of security reasons I managed to download the zip file (v12.22.12) from https://nodejs.org/en/download/releases and extracted it to the nvm folder and it worked automatically. |
Why did this suddenly start happening on older versions of NVM though? We've been using NVM 1.1.9 for a long time, installing Node 14 without issues. Then our Jenkins builds randomly started failing with the "used by another process" error without us changing anything on our side. |
@Jc73CCm4 I wish I knew. I still suspect something may have changed on the source servers. It could have been something like a proxy change causing download links to resolve incorrectly, or any number of other things. The only "event" I'm aware of recently was the Node Collaborators summit. Maybe something changed there. I really don't know as I could not attend this one. To be honest, I grow rather tired of these kinds of changes because they do happen, usually unannounced, and they cause a lot of problems for a lot of people. We are seriously considering setting up a Node.js mirror for Runtime (the successor to this project). This would provide greater control over the network stack and provide us the ability to mitigate these problems before they affect users. This would likely need to be part of a paid offering since storage/bandwidth aren't free, and there is work involved in maintaining a mirror. Apologies if this comes across as a mini-rant. I'm writing this more so to point out I'd also like to know the root cause, but there are things we can do if the root cause cannot be identified or if it's simply due to volatility in governance. |
I think it's the same, here's my details
and
|
The reason I am downgrading is because of an older repo that was using version 13 and I want to make a few changes to it, and so I think old version support is crucial as a lot of code has already been written in older versions |
Until there is an official fix for this, what I did in the meantime was this as a workaround for now, in case anyone is using windows
Ran nvm ls and did an npm install on the node 14 project for a check and it worked! |
@mejobloggs-cw If you tried installing Node v10.16.1 with the non-patched version before trying to install with the patched version, you need to remove the "partially installed" Node version in So just go to |
It was done using NVM 1.1.12. If i cleanup the files and try again, same issue |
@mejobloggs-cw Hm then I'm not sure! |
Hey, I just wanted to let you know that you saved the day for me and 30 fellow CS students. Thank you. |
I solved it by doing the following process: running the command: nvm on downloa file node.exe, of the version you need in this case: https://nodejs.org/en/blog/release/v14.21.3 Copy and paste it into the path: C:\Users\ Then run nvm install 14.21.3 and nvm use 14.21.3 |
What happened?
C:\Windows\System32>nvm install 12
Downloading node.js version 12.22.12 (64-bit)...
Download failed. Rolling Back.
C:\Users\predrags\AppData\Roaming\nvm\v12.22.12\node64.exe
Rollback failed. remove C:\Users\predrags\AppData\Roaming\nvm\v12.22.12\node64.exe: The process cannot access the file because it is being used by another process.
Could not download node.js v12.22.12 64-bit executable.
What did you expect to happen?
installation to work
Version
1.1.11 or newer (Default)
Which version of Windows?
Windows 11+
Which locale?
Western European
Which shell are you running NVM4W in?
Command Prompt
User Permissions?
Administrative Privileges, Elevated
Is Developer Mode enabled?
No (Default)
Relevant log/console output
Debug Output
Anything else?
No response
The text was updated successfully, but these errors were encountered: