Skip to content
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]: Unable to install npm on older nodejs versions #1209

Open
suyar opened this issue Jan 1, 2025 · 15 comments
Open

[Issue]: Unable to install npm on older nodejs versions #1209

suyar opened this issue Jan 1, 2025 · 15 comments

Comments

@suyar
Copy link

suyar commented Jan 1, 2025

What happened?

When I install nodejs 14, I get the following error:

error installing 14.21.3: open C:\Users\su\AppData\Local\Temp\nvm-npm-2016208765\npm-v6.14.18.zip: The system cannot find the file specified.

Using nvm install lts is fine.

What did you expect to happen?

Install older versions of nodejs correctly.

Version

1.2.0 or newer (Default)

Which version of Windows?

Windows 11+ (Default)

Which locale?

Asian

Which shell are you running NVM4W in?

PowerShell

User Permissions?

Standard User, Elevated

Is Developer Mode enabled?

None

Relevant log/console output

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

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

Debug Output

PS C:\Users\su> nvm debug
su is not using admin or elevated rights.

Windows Version:        10.0 (Build 26100)

Windows Developer Mode: UNKNOWN

NVM4W Version:          1.2.2
NVM4W Author Bridge:    1.0.1
NVM4W Path:             D:\Soft\nvm\nvm.exe
NVM4W Settings:         D:\Soft\nvm\settings.txt
NVM_HOME:               D:\Soft\nvm
NVM_SYMLINK:            D:\Soft\nodejs
Node Installations:     D:\Soft\nvm
Default Architecture:   64-bit
Mirrors:                No mirrors configured
HTTP Proxy:             none

Total Node.js Versions: 0
Active Node.js Version: none
(run "nvm use <version>" to activate a version)
NVM_SYMLINK does not exist yet. This is auto-created when "nvm use" is run.

IPv6 is enabled. This has been known to slow downloads significantly.

No problems detected.

⚠️  NVM for Windows will eventually be succeeded by Author/Runtime


Find help at https://github.com/coreybutler/nvm-windows/wiki/Common-Issues

Anything else?

No response

@coreybutler coreybutler changed the title [Issue]: Unable to install older nodejs versions [Issue]: Unable to install npm on older nodejs versions Jan 1, 2025
@MaxPyvovarchuk
Copy link

Have the same issue

@Nachiten
Copy link

Nachiten commented Jan 2, 2025

Here I have the same issue, trying to install v14.21.3, with a powershell running as administrator:

PS C:\Windows\system32> nvm list

No installations recognized.
PS C:\Windows\system32> nvm install v14.21.3
Downloading node.js version 14.21.3 (64-bit)...
Complete
Downloading npm...
Creating C:\Users\Usuario\AppData\Local\Temp\nvm-install-3965550998\temp

Downloading npm version 6.14.18... Complete
Installing npm v6.14.18...
error installing 14.21.3: open C:\Users\Usuario\AppData\Local\Temp\nvm-npm-2437574939\npm-v6.14.18.zip: El sistema no puede encontrar el archivo especificado.

@BiggerMini
Copy link

same issue

nvm install 14.21.1
Downloading node.js version 14.21.1 (64-bit)...
Complete
Downloading npm...
Creating C:\Users\xxx\AppData\Local\Temp\nvm-install-676900908\temp

Downloading npm version 6.14.17... Complete
Installing npm v6.14.17...
error installing 14.21.1: open C:\Users\xxx\AppData\Local\Temp\nvm-npm-4014331864\npm-v6.14.17.zip: The system cannot find the file specified.

@HandsomeBoy01
Copy link

same issue

1 similar comment
@action-hong
Copy link

same issue

@MaxPyvovarchuk
Copy link

Downgrate to 1.11.1 helps fow windows 10 and windows 11

@iramos85
Copy link

iramos85 commented Jan 3, 2025

Downgrate to 1.11.1 helps fow windows 10 and windows 11

just to be clear, using NVM for Windows v1.11.1 could be a workaround?

@jakub-vozenilek
Copy link

Had same issue. Installed version v1.1.11, which solves the problem until fixed version is released

@MaxPyvovarchuk
Copy link

Downgrate to 1.11.1 helps fow windows 10 and windows 11

just to be clear, using NVM for Windows v1.11.1 could be a workaround?

Correct

@anshuman910
Copy link

same issue

@ChSF001
Copy link

ChSF001 commented Jan 7, 2025

same issue,My attempt to install v14.21.3 failed, but v16.20.2 succeeded

@coreybutler
Copy link
Owner

There is a (slightly) new install process, which I didn't think would affect npm, but obviously something has. It would be helpful if someone who has had this issue can post the output of nvm install 14 --verbose (on v1.2.1 or higher).

@ChSF001
Copy link

ChSF001 commented Jan 7, 2025

C:\Users\Admin>nvm install 14 --verbose
[DEBUG] D:/a/nvm-windows/nvm-windows/src/nvm.go:187 command: nvm install 14 --verbose
[DEBUG] D:/a/nvm-windows/nvm-windows/src/nvm.go:206 arch: 64
[DEBUG] D:/a/nvm-windows/nvm-windows/src/web/web.go:219 running GetNodeJS with root: C:\Users\Admin\AppData\Local\Temp\nvm-install-233411923, v14.21.3, arch: 64, append: false
[DEBUG] D:/a/nvm-windows/nvm-windows/src/web/web.go:248 download url: https://npmmirror.com/mirrors/node/v14.21.3/win-x64/node.exe
Downloading node.js version 14.21.3 (64-bit)...
[DEBUG] D:/a/nvm-windows/nvm-windows/src/web/web.go:262 download succeeded
Complete
Downloading npm...
[DEBUG] D:/a/nvm-windows/nvm-windows/src/web/web.go:327 downloading npm from https://npmmirror.com/mirrors/npm/v6.14.18.zip to C:\Users\Admin\AppData\Local\Temp\nvm-install-233411923\temp
Creating C:\Users\Admin\AppData\Local\Temp\nvm-install-233411923\temp

Downloading npm version 6.14.18... [DEBUG] D:/a/nvm-windows/nvm-windows/src/web/web.go:342 npm download succeeded
Complete
Installing npm v6.14.18...
error installing 14.21.3: open C:\Users\Admin\AppData\Local\Temp\nvm-npm-2064342918\npm-v6.14.18.zip: The system cannot find the file specified.

C:\Users\Admin>cd %TEMP%

C:\Users\Admin\AppData\Local\Temp>tree nvm-npm-2064342918 /f
C:\USERS\ADMIN\APPDATA\LOCAL\TEMP\NVM-NPM-2064342918


C:\Users\Admin\AppData\Local\Temp>tree nvm-install-233411923 /f
C:\USERS\ADMIN\APPDATA\LOCAL\TEMP\NVM-INSTALL-233411923
├─temp
│      npm-v6.14.18.zip
│
└─v14.21.3
    │  node64.exe
    │
    └─node_modules

Here, you can clearly see that the location of the related files in the temporary directory is different from the expected

@coreybutler
Copy link
Owner

@ChSF001 thank you so much for this. The fact that the temp directory still exists after the failed install is a clear indicator too (because it deletes the temp directory on exit, regardless of success/failure). I'm fairly certain this boils down to a variable name... the new temporary directory is referred to as tmp while the old one was temp. I probably missed a variable replacement.

I'm pretty confident I can get this fixed for the next release (v1.2.3). There are a few other pressing issues I'm fixing as well, but I hope to have a new release with all of them sometime this week/weekend.

@bdamatan
Copy link

bdamatan commented Jan 8, 2025

Same issue for me on v1.2.2. Potentially useful workaround is to go back to a previous version like v1.1.12. I had an older version of nvm4m on a different machine and I was able to install older versions of node like 12.91.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests