我正在尝试将VUE CLI安装到我的笔记本电脑中,但它会出现以下错误。
λ npm install -g vue-cli
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.nmpjs.org/vue-cli failed, reason: connect ETIMEDOUT 218.93.250.18: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\ABDUR REHMAN KHALID\AppData\Roaming\npm-cache\_logs\2018-01-29T07_46_22_789Z-debug.log
答案 0 :(得分:0)
这不是Vue问题。您的注册表似乎设置为错误的网址。使用以下命令将注册表设置为正确的URL:
npm config set registry https://registry.npmjs.org/
答案 1 :(得分:0)
如果您尝试安装vue-cli,那么您应该尝试这个。
sudo npm install --global vue-cli