使用npm安装vue时存在的问题
在B站学vue的时候发现npm install vue --save无法使用
报错
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/nrm failed, reason: connect ETIMEDOUT 213.34.21.1:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\86138\AppData\Roaming\npm-cache_logs\2021-04-14T15_41_36_709Z-debug.log
解决方法:
先使用npm cache clean -f
在使用npm install nrm -g
最后就能够正常安装Vue了。
希望对你有帮助。