npm install安装报错问题解决方案

项目场景:

Vue项目安装命令:
npm config set registry https://registry.npm.taobao.org
npm config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass
npm install


问题描述:

提示:npm ERR!

1486 verbose argv "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_global\\node_modules\\npm\\bin\\npm-cli.js" "install"
1487 verbose node v14.17.0
1488 verbose npm  v7.15.0
1489 error code ETIMEDOUT
1490 error syscall connect
1491 error errno ETIMEDOUT
1492 error network request to https://registry.npm.taobao.org/yorkie/download/yorkie-2.0.0.tgz failed, reason: connect ETIMEDOUT 93.184.216.34:8080
1493 error network This is a problem related to network connectivity.
1493 error network In most cases you are behind a proxy or have bad network settings.
1493 error network
1493 error network If you are behind a proxy, please make sure that the
1493 error network 'proxy' config is set properly.  See: 'npm help config'
1494 verbose exit 1

原因分析:

代理的问题。


解决方案:

清除代理和缓存,问题解决。

npm install安装报错问题解决方案_第1张图片

项目运行成功截图:

npm install安装报错问题解决方案_第2张图片

你可能感兴趣的:(前端,npm)