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 process cannot access the file because it is being used by another process #580
Comments
Cannot recreate: Things to look for
This is most commonly caused by a network failure. You can also download npm and install it manually if needed. |
We see this frequently in our shop. The message is generated in web.go->func Download(...). The top of this function contains:
Later, there are 2 different error handling stanzas. The one for ctrl-c includes:
The one for an HTTP failure does not include these closes. So, in the event of an HTTP failure, the code attempts to delete the folder containing the failed download, but cannot because the output file is still open. This results in the "rollback failed" message. If this analysis is correct, one solution would be to add the closes that are found in the ctrl-c handler to the http error handler. |
Resolved in 5751e53. This will be released in v1.1.9. |
I modify the nvm mirror(npm&node) and met the same issues,delete the mirror solved the problem. |
The issue is still present on v1.1.9, I just tried to use nvm install 13.7.0 and cannot use that version |
Same I am also getting this issue: C:\WINDOWS\system32>nvm install 16.13.0Downloading node.js version 16.13.0 (64-bit)... CompleteCreating C:\Users\n0311764\AppData\Roaming\nvm\temp Downloading npm version 8.1.0... Download failed. Rolling Back.Rollback failed. remove C:\Users\n0311764\AppData\Roaming\nvm\temp\npm-v8.1.0.zip: The process cannot access the file because it is being used by another process.Could not download npm for node v16.13.0.Please visit https://github.com/npm/npm/releases/tag/v8.1.0 to download npm.It should be extracted to C:\Users\n0311764\AppData\Roaming\nvm\v16.13.0 |
Turn on "Developer Mode" by searching for the developer settings. |
Developer settings for NVM? |
Developer Mode is part of Windows. See https://github.com/coreybutler/nvm-windows/wiki/Common-Issues#permissions-exit-1-exit-5-access-denied-exit-145 |
This worked perfectly, thanks |
I get this error only if trying to install node 14.19.2 |
Confirmed. I could even install 14.9.1 (npm 6.14.16) without problems, while 14.9.2 (npm 6.14.17) gives "download failed". |
I see the same behaviour as @johnvt. Older versions such as The command is ran in an elevated Git Bash Windows Terminal instance. $ nvm install 14.19.2
Downloading node.js version 14.19.2 (64-bit)...
Complete
Downloading npm version 6.14.17... Download failed. Rolling Back.
Rollback failed. remove C:\Users\xxxxx\AppData\Roaming\nvm\temp\npm-v6.14.17.zip: The process cannot access the file because it is being used by another process.
Could not download npm for node v14.19.2.
Please visit https://github.com/npm/cli/releases/tag/v6.14.17 to download npm.
It should be extracted to C:\Users\xxxxx\AppData\Roaming\nvm\v14.19.2 $ nvm version
1.1.9 |
Can also confirm this happens for 14.19.3 for me. |
nodejs 14.19.3,14.19.2 is failed. |
The above helped me, but the specific reason is still unknown, maybe npm official problem |
I had the same problem, it only installs which |
Environment: Windows10 operating system
Quesion: npm download failed, Rolling Back, Rollback failed. Remove npm-v3.10.10.zip: The process cannot access the file because it is being used by another process.
Tried solutions: Computer shutdown and restart, still not solve the problem, is still the same error.
The text was updated successfully, but these errors were encountered: