错误:
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