npm安装依赖报错npm

zhangjunzheng@zhengbabadeMacBook-Air vue % npm install -g vue-cli
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.cnpmjs.org/vue-cli failed, reason: getaddrinfo ENOTFOUND registry.cnpmjs.org
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! /Users/zhangjunzheng/.npm/_logs/2022-03-02T01_28_44_409Z-debug.log

换一个源

npm config set registry https://registry.npmmirror.com

npm ERR! /Users/zhangjunzheng/.npm/_logs/2022-03-02T01_28_44_409Z-debug.log
这里的报错 说的是报错日志路径 你可以去日志里看看具体报错

npm install -g vue-cli