分析

大概率是因为网络连接卡住了,导致读取metadata的时候过不去

可能会有如下报错(垃圾移动校园网连接淘宝镜像比逃离还卡)

npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npm.taobao.org/grunt-cli failed, reason: connect ETIMEDOUT 114.55.80.225:80
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'

解决方案

更换国内淘宝镜像源 https://npm.taobao.org/

为npm设置代理:

npm config set proxy http://127.0.0.1:1080

取消代理:

npm config delete proxy

如果代理有用户名和密码

npm config set proxy http://username:[email protected]:port

说点什么
支持Markdown语法
好耶,沙发还空着ヾ(≧▽≦*)o
Loading...