錯誤:
C:\Users\H3C>nvm install 14.21.3 Downloading node.js version 14.21.3 (64-bit)... Complete Downloading npm... Creating C:\Users\H3C\AppData\Local\Temp\nvm-install-939491942\temp Downloading npm version 6.14.18... Error while downloading https://github.com/npm/cli/archive/v6.14.18.zip - Get "https://github.com/npm/cli/archive/v6.14.18.zip": read tcp 1xxxxxxx->xxxxxxxx: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. error installing 14.21.3: Could not download npm for node v14.21.3. Please visit https://github.com/npm/cli/archive/14.21.3 to download npm. It should be extracted to D:\nvm\nvm\v14.21.3
解決:
1.手動下載npm version 6.14.18
2.將空文件夾node_doules下新建npm文件夾,并將 上述的zip解壓的全部拷貝進去
3.單獨將上述npm中的以下啟動文件拷貝出來,參考下圖:
4.重新打開cmd,運行,即可
node -vnpm -v