Taro npm run build:alipay打包编译报错

nvm镜像配置

1
nvm node_mirror https://npmmirror.com/mirrors/node/
1
nvm npm_mirror https://npmmirror.com/mirrors/npm/

常见问题

npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。

使用nvm 安装node时注意如果提示以下信息就是网络不好,需要配置代理或者镜像

1
2
3
4
Downloading node.js version 12.22.0 (64-bit)...
Complete
Downloading npm version 6.14.11... Error while downloading https://github.com/npm/cli/archive/v6.14.11.zip - Get "https://github.com/npm/cli/archive/v6.14.11.zip": dial tcp 20.205.243.166:443: connectex: 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.
Please visit https://github.com/npm/cli/releases/tag/v6.14.11 to download npm.