nvm-windows icon indicating copy to clipboard operation
nvm-windows copied to clipboard

[Issue]: npm install error

Open baiyajin opened this issue 8 months ago • 22 comments

What happened?

C:\Users\Administrator>nvm install 14.21.3 Downloading node.js version 14.21.3 (64-bit)... Complete Downloading npm... Creating C:\Users\Administrator\AppData\Local\Temp\nvm-install-3382161075\temp

Downloading npm version 6.14.18... Complete Installing npm v6.14.18... error installing 14.21.3: open C:\Users\Administrator\AppData\Local\Temp\nvm-npm-4204267377\npm-v6.14.18.zip: The system cannot find the file specified.

What did you expect to happen?

C:\Users\Administrator>nvm install 14.21.3 Downloading node.js version 14.21.3 (64-bit)... Complete Downloading npm... Creating C:\Users\Administrator\AppData\Local\Temp\nvm-install-3382161075\temp

Downloading npm version 6.14.18... Complete Installing npm v6.14.18... error installing 14.21.3: open C:\Users\Administrator\AppData\Local\Temp\nvm-npm-4204267377\npm-v6.14.18.zip: The system cannot find the file specified.

Version

1.2.0 or newer (Default)

Which version of Windows?

No response

Which locale?

None

Which shell are you running NVM4W in?

No response

User Permissions?

Administrative Privileges, Elevated

Is Developer Mode enabled?

None

Relevant log/console output


Debug Output

C:\Users\Administrator>nvm install 14.21.3
Downloading node.js version 14.21.3 (64-bit)...
Complete
Downloading npm...
Creating C:\Users\Administrator\AppData\Local\Temp\nvm-install-3382161075\temp

Downloading npm version 6.14.18... Complete
Installing npm v6.14.18...
error installing 14.21.3: open C:\Users\Administrator\AppData\Local\Temp\nvm-npm-4204267377\npm-v6.14.18.zip: The system cannot find the file specified.

Anything else?

No response

baiyajin avatar Mar 07 '25 05:03 baiyajin

i have same issue, i think its bugs, when trying to copying npm file. try to use another version like v1.1.12

ref : https://github.com/coreybutler/nvm-windows/issues/1229

ikhbalfuady avatar Mar 07 '25 06:03 ikhbalfuady

Same issue here och version 1.2.2 I found on file though in AppData\Local\Temp\nvm-install-1573846107\temp\npm-v6.14.13.zip

torselden avatar Mar 07 '25 12:03 torselden

I have the same error with another nodejs version

ecohortFJS avatar Mar 07 '25 15:03 ecohortFJS

This should be fixed by mergin #1220. Also this is possibly a duplicate of #1209

torselden avatar Mar 07 '25 16:03 torselden

This should be fixed by mergin #1220. Also this is possibly a duplicate of #1209

Thank you very much for your prompt response. For the moment I solved it with a downgrade to 1.1.12 and it works perfectly

ecohort avatar Mar 07 '25 18:03 ecohort

Duplicate issues #1209, #1221, #1224, #1229, #1240

proCoderSid avatar Mar 09 '25 19:03 proCoderSid

This issue occurs in all versions older than v16.10.0

proCoderSid avatar Mar 09 '25 19:03 proCoderSid

@coreybutler NVM for Windows v1.2 is unusable for any node versions below v16.10. There is already a pull request to fix this (#1220), please could you publish a release with this fix?

techiegm avatar Mar 11 '25 23:03 techiegm

I know I've been slow to release v1.2.3 with the fix, and I apologize for that. I don't need the PR (I'd already fixed it), but I've been busy trying to get an Azure spot instance with Windows 11 ARM64 setup as a GitHub runner. Turns out that is the only way we can continue supporting ARM builds (which are also new in 1.2.x) since Qemu emulation isn't doing the trick. In other words, this issue is kind of blocked by the automated build process.

coreybutler avatar Mar 12 '25 00:03 coreybutler

Happy to know it's on the radar and fingers crossed you're able to get the Github runner woes sorted

techiegm avatar Mar 12 '25 00:03 techiegm

Hi! Sorry for pushing you but you have any news on that @coreybutler?

odrumond avatar Apr 10 '25 20:04 odrumond

At https://github.com/coreybutler/nvm-windows/blob/f538704ab58d0d5583957f00cd1b08a304770f76/src/nvm.go#L745-L754 in origin:master@HEAD, the path passed to the unzip function is still incorrect. Corey, is your fix for this unmerged or not pushed yet?

BinToss avatar Apr 15 '25 20:04 BinToss

Facing same error:

❯ nvm install 14
Downloading node.js version 14.21.3 (64-bit)...
Complete
Downloading npm...
Creating C:\Users\MUHAMM~1\AppData\Local\Temp\nvm-install-2773513892\temp

Downloading npm version 6.14.18... Complete
Installing npm v6.14.18...
error installing 14.21.3: open C:\Users\<user-name>\AppData\Local\Temp\nvm-npm-3757959535\npm-v6.14.18.zip: The system cannot find the file specified.

mawais-afz avatar May 15 '25 16:05 mawais-afz

I'm getting the same issue for 14.15.4:

node v14.15.4 is not installed. Type "nvm list" to see what is installed.
Downloading node.js version 14.15.4 (64-bit)...
Complete
Downloading npm...
Creating C:\Users\ARGINE~1\AppData\Local\Temp\nvm-install-4072800141\temp

Downloading npm version 6.14.10... Complete
Installing npm v6.14.10...
error installing 14.15.4: open C:\Users\ARGINE~1\AppData\Local\Temp\nvm-npm-4131144567\npm-v6.14.10.zip: The system cannot find the file specified.

Any chance there is a timeline for the fix to be merged?

Alternatively - has anyone found a workaround to get a pre-17 version working?

arharutyu avatar May 18 '25 04:05 arharutyu

Windows ARM is a very small userbase. It should not block an x86 release for everyone else.

OrangeDog avatar May 21 '25 16:05 OrangeDog

@OrangeDog what metrics do you have supporting the claim that ARM is a small userbase?

coreybutler avatar May 21 '25 18:05 coreybutler

@coreybutler they are only just approaching 13% of new PC sales, and not all of those are running Windows. https://www.tomshardware.com/pc-components/cpus/arm-pc-market-share-wont-rise-above-13-percent-in-2025-says-abi-research

It's miniscule compared to all the x86 Windows systems already in use.

OrangeDog avatar May 21 '25 18:05 OrangeDog

@OrangeDog what about servers?

I appreciate the desire and encouragement to release. I too am frustrated with issues like this one. Regardless, I have to remain vigilant of the ripple effect releases have.

I've never really spoken about it, but once a release is published, there is a period of time where several of the antivirus platforms mark it as a virus (many AV providers rely on weak ML algorithms that produce a lot of false positives). There are governance/provenance reports that have to be issued. I inevitably get emails with CrowdStrike reports from governments, militaries, financial institutions, etc... all of which need verification that the software is indeed safe. The point is releases consume a lot of my time, so I don't take them lightly.

If only 5% of the userbase uses ARM, that's still 650K users. I don't have the bandwidth to release now, then again later. I'm trying to assure the next release is stable for everybody.

coreybutler avatar May 21 '25 20:05 coreybutler

Windows doesn't even support ARM for server images yet. You have to be on insider preview to get them.

5% is still a wild overestimate.

OrangeDog avatar May 22 '25 09:05 OrangeDog

@OrangeDog what about servers?

I appreciate the desire and encouragement to release. I too am frustrated with issues like this one. Regardless, I have to remain vigilant of the ripple effect releases have.

I've never really spoken about it, but once a release is published, there is a period of time where several of the antivirus platforms mark it as a virus (many AV providers rely on weak ML algorithms that produce a lot of false positives). There are governance/provenance reports that have to be issued. I inevitably get emails with CrowdStrike reports from governments, militaries, financial institutions, etc... all of which need verification that the software is indeed safe. The point is releases consume a lot of my time, so I don't take them lightly.

If only 5% of the userbase uses ARM, that's still 650K users. I don't have the bandwidth to release now, then again later. I'm trying to assure the next release is stable for everybody.

Thank you very much for your work and for all that effort. I ask you from ignorance: would there be any way to publish pre-release versions so that those who follow the repository can have them before without having to go through the filters of antivirus and the like? I understand that signing binaries with certificates must be complex.

nonodev96 avatar Jun 01 '25 10:06 nonodev96

@nonodev96 Thanks for the valuable question/idea.

Signing binaries is actually pretty easy now. It wasn't that way until v1.2.0, but we have an automated process with Microsoft now. The challenge really is the antivirus aftermath that happens no matter what kind of release it is. It's all a matter of how third parties respond (i.e. Norton, CrowdStrike, etc.).

That said, I'll think about a prerelease. Conceptually, it's a good idea. Practically, I need to review the code to see what could be stripped out to push a release. The ARM integration touches most parts of the code, so that might be a little difficult.

coreybutler avatar Jun 02 '25 20:06 coreybutler

Same Problems here. I was so pissed off when I tried to install older version of Node.js and get errors again and again. Soon I found the program tried to unzip the npm file from a different path it has created when I calmed down and tried to read the log. It's funny that this bug still haven't been solved yet after this long.

Isga1 avatar Jun 09 '25 18:06 Isga1

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.

github-actions[bot] avatar Jul 10 '25 02:07 github-actions[bot]

unstale

OrangeDog avatar Jul 10 '25 16:07 OrangeDog

Do we know what version will fix this, and when?

Thank you!

jcbeck37 avatar Jul 14 '25 16:07 jcbeck37

I am also experiencing this issue and waiting for the fix release. Thank you!

ryo-iso avatar Jul 23 '25 01:07 ryo-iso

Can I patch the issue myself? I don't have the time to wait I'm afraid, as I need to update an older installation for a client. Thanks in advance.

filip-van-hoeckel avatar Jul 23 '25 07:07 filip-van-hoeckel

Can I patch the issue myself? I don't have the time to wait I'm afraid, as I need to update an older installation for a client. Thanks in advance.

A. Revert to a Pre-2.0 release. Those work as intended. B. Build from one of the Pull Requests that fix this issue and distribute the binaries. Yes, there's not one, but two pull requests that fix this issue.

  • https://github.com/coreybutler/nvm-windows/pull/1220
  • https://github.com/coreybutler/nvm-windows/pull/1264

BinToss avatar Jul 24 '25 01:07 BinToss

Can I patch the issue myself? I don't have the time to wait I'm afraid, as I need to update an older installation for a client. Thanks in advance.

A. Revert to a Pre-2.0 release. Those work as intended. B. Build from one of the Pull Requests that fix this issue and distribute the binaries. Yes, there's not one, but two pull requests that fix this issue.

* [Fix npm install #1220](https://github.com/coreybutler/nvm-windows/pull/1220)

* [Fix installing older nodejs versions #1264](https://github.com/coreybutler/nvm-windows/pull/1264)

Lol make that three, anyway a release is here for those that need it

tadghh avatar Aug 20 '25 05:08 tadghh

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.

github-actions[bot] avatar Sep 20 '25 02:09 github-actions[bot]