nvm安装node超时

安装node超时,把本次安装的下载超时延长到 10 分钟,版本列表超时延长到 30 秒即可解决!

可以,把本次安装的下载超时延长到 10 分钟,版本列表超时延长到 30 秒:

nvm install lts --timeout-download-ms=600000 --timeout-catalog-ms=30000 --timeout-catalog-mirror-ms=30000

这些参数只对本次命令生效,继续使用你当前的官方源。维护者对超时参数的说明

以下是实践信息

PS C:\Users\Administrator> nvm --version
v2.0.1-hotfix.6

PS C:\Users\Administrator> nvm install lts
FAILED v24.22.0: failed to download Node.js v24.22.0 (node-v24.22.0-win-x64.7z) from configured mirror (TimeoutDownloadMs 30000ms (default)): archive https://nodejs.org/dist/v24.22.0/node-v24.22.0-win-x64.7z: context deadline exceeded (Client.Timeout or context cancellation while reading body)
1 version(s) failed to install

PS C:\Users\Administrator> nvm install lts --timeout-download-ms=600000 --timeout-catalog-ms=30000 --timeout-catalog-mirror-ms=30000
⠇ Installing 1 version: Waiting... 1m34s
Now using Node.js v24.22.0 by default.
Installed 1 version: 24.22.0
Completed in 1m50s
posted @ 2026-10-20 21:48  丁少华  阅读(14)  评论(0)    收藏  举报