清除缓存之前
npm cache clear
Run Code Online (Sandbox Code Playgroud)
npm工作正常.清除缓存后,它无法正常工作.下面的错误日志表明互联网连接问题但互联网连接很好.这个问题不仅发生在凉亭上,也发生在任何模块上.
这是流程的输出:
> sudo npm install -g bower Password: npm http GET
> https://registry.npmjs.org/bower npm http GET
> https://registry.npmjs.org/bower npm http GET
> https://registry.npmjs.org/bower npm ERR! network connect ETIMEDOUT
> npm ERR! network This is most likely not a problem with npm itself npm
> ERR! network and is 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! …
Run Code Online (Sandbox Code Playgroud)