install 超時
查看npm源地址
npm config get registry
#http://registry.npmjs.org 為國外鏡像地址
設置阿里雲鏡像
npm config set registry http://registry.npm.taobao.org
如果不能解決
npm install --registry=https://registry.npm.taobao.org
重新運行npm命令,解決
npm ERR! code ELIFECYCLE
node_modules的問題,重新安裝
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install # 很慢
npm run build
另一種設置鏡像的方法
npm install -g cnpm --registry=http://registry.npm.taobao.org
cnpm -v
cnpm install