Open cope opened 2 weeks ago
This just happened to me as well (using nvm 1.1.12) with multiple versions:
C:\Windows\System32>nvm install 14.21.3
Downloading node.js version 14.21.3 (64-bit)...
Download failed. Rolling Back.
C:\Users\hornj\AppData\Roaming\nvm\v14.21.3\node64.exe
Rollback failed. remove C:\Users\hornj\AppData\Roaming\nvm\v14.21.3\node64.exe: The process cannot access the file because it is being used by another process.
Could not download node.js v14.21.3 64-bit executable.
C:\Windows\System32>nvm install 15.14.0
Downloading node.js version 15.14.0 (64-bit)...
Download failed. Rolling Back.
C:\Users\hornj\AppData\Roaming\nvm\v15.14.0\node64.exe
Rollback failed. remove C:\Users\hornj\AppData\Roaming\nvm\v15.14.0\node64.exe: The process cannot access the file because it is being used by another process.
Could not download node.js v15.14.0 64-bit executable.
C:\Windows\System32>nvm install 13.14.0
Downloading node.js version 13.14.0 (64-bit)...
Download failed. Rolling Back.
C:\Users\hornj\AppData\Roaming\nvm\v13.14.0\node64.exe
Rollback failed. remove C:\Users\hornj\AppData\Roaming\nvm\v13.14.0\node64.exe: The process cannot access the file because it is being used by another process.
Could not download node.js v13.14.0 64-bit executable.
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 on a different network right now, no proxy as well.
C:\Users\hornj>nvm install 14.21.3
Downloading node.js version 14.21.3 (64-bit)...
Download failed. Rolling Back.
C:\Users\hornj\AppData\Roaming\nvm\v14.21.3\node64.exe
Rollback failed. remove C:\Users\hornj\AppData\Roaming\nvm\v14.21.3\node64.exe: The process cannot access the file because it is being used by another process.
Could not download node.js v14.21.3 64-bit executable.
C:\Users\hornj>nvm install 18.20.1
Downloading node.js version 18.20.1 (64-bit)...
Extracting node and npm...
Complete
npm v10.5.0 installed successfully.
Installation complete. If you want to use this version, type
nvm use 18.20.1
I am experiencing a similar issue. Here is another data point.
Failing to install v8.11.0
nvm install 8.11.0
Downloading node.js version 8.11.0 (64-bit)...
Download failed. Rolling Back.
C:\Tools\nvm\v8.11.0\node64.exe
Rollback failed. remove C:\Tools\nvm\v8.11.0\node64.exe: The process cannot access the file because it is being used by another process.
Could not download node.js v8.11.0 64-bit executable.
Successfully installing v18.17.1
nvm install 18.17.1
Downloading node.js version 18.17.1 (64-bit)...
Extracting node and npm...
Complete
npm v9.6.7 installed successfully.
Installation complete. If you want to use this version, type
nvm use 18.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 /node.exe
. The URLs end up being like this for Node 14 and Node 19 for instance:
https://nodejs.org/dist/v14.21.3/win-x64//node.exe
https://nodejs.org/dist/v19.9.0/win-x64//node.exe
But then further down in the same function the URL for Node 19 gets rebuilt to https://nodejs.org/dist/v19.9.0/node-v19.9.0-win-x64.zip
because there's this check.
I've just removed the slash in first GetFullNodeUrl
call, and now I can install Node versions older than 16.9.0.
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.
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.
The exe seems to not be signed?
@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. I was having the issue with nvm install 10.13. After installing the patch build, the same command worked.
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:
C:\Users\entru>nvm install 11.9.0
Downloading node.js version 11.9.0 (64-bit)...
Download failed. Rolling Back.
C:\Users\entru\AppData\Roaming\nvm\v11.9.0\node64.exe
Rollback failed. remove C:\Users\entru\AppData\Roaming\nvm\v11.9.0\node64.exe: The process cannot access the file because it is being used by another process.
Could not download node.js v11.9.0 64-bit executable.
update: thank you @stefan-ptrvch your bugfix solve my problem
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
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
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. I confirm @stefan-ptrvch 's fix worked like a charm! Thank you so much, have a beautiful day !
@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 nvm version
as 1.1.11, so I assume it's just mislabeled in the build.
@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 master
so you can download it and built it yourself if you want.
@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!
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?
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.
@mejobloggs-cw are you getting the same error originally posted or something else?
I think it's the same, here's my details
nvm install 10.16.1
Downloading node.js version 10.16.1 (64-bit)...
Download failed. Rolling Back.
C:\Users\UserName\AppData\Roaming\nvm\v10.16.1\node64.exe
Rollback failed. remove C:\Users\UserName\AppData\Roaming\nvm\v10.16.1\node64.exe: The process cannot access the file because it is being used by another process.
Could not download node.js v10.16.1 64-bit executable.
and nvm debug
output
Running NVM for Windows with administrator privileges.
Administrator: PowerShell
Windows Version: 10.0 (Build 22631)
NVM4W Version: 1.1.12
NVM4W Path: C:\Users\UserName\AppData\Roaming\nvm\nvm.exe
NVM4W Settings: C:\Users\UserName\AppData\Roaming\nvm\settings.txt
NVM_HOME: C:\Users\UserName\AppData\Roaming\nvm
NVM_SYMLINK: C:\Program Files\nodejs
Node Installations: C:\Users\UserName\AppData\Roaming\nvm
Total Node.js Versions: 10
Active Node.js Version: v23.2.0
IPv6 is enabled. This can slow downloads significantly.
PROBLEMS DETECTED
-----------------
The following Node installations are invalid (missing node.exe): v10.16.1 - consider reinstalling these versions
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?
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 C:\Users\UserName\AppData\Roaming\nvm\v10.16.1
first.
So just go to C:\Users\UserName\AppData\Roaming\nvm
and remove the v10.16.1
directory. Then installing with the patched version should work hopefully!
@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
C:\Users\UserName\AppData\Roaming\nvm\v10.16.1
first.So just go to
C:\Users\UserName\AppData\Roaming\nvm
and remove thev10.16.1
directory. Then installing with the patched version should work hopefully!
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!
@stefan-ptrvch
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
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\**[your_user]**
\AppData\Roaming\nvm\v14.21.3
Then run nvm install 14.21.3 and nvm use 14.21.3
@jdmartinezm
Then run nvm install 14.21.3 and nvm use 14.21.3
After creating the folder, nvm identifies the version as installed. So the 'nvm install' command will indicate that the version is already installed.
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