gpt4 book ai didi

node.js - 清除缓存后 npm 不工作

转载 作者:IT老高 更新时间:2023-10-28 21:49:20 26 4
gpt4 key购买 nike

清除缓存之前

npm cache clear

npm 工作正常。清除缓存后,它不起作用。下面的错误日志表明互联网连接有问题,但互联网连接很好。这个问题不仅发生在 bower 上,而且发生在任何模块上。

这是进程的输出:

> 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! 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! System Darwin 12.5.0 npm ERR! command
> "/usr/local/Cellar/node/0.10.16/bin/node" "/usr/local/bin/npm"
> "install" "-g" "bower" npm ERR! cwd /Users/username npm ERR!
> node -v v0.10.16 npm ERR! npm -v 1.3.8 npm ERR! syscall connect npm
> ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! npm ERR!
> Additional logging details can be found in: npm ERR!
> /Users/username/npm-debug.log npm ERR! not ok code 0

最佳答案

这对我有用:

npm cache clean --force 

关于node.js - 清除缓存后 npm 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20259492/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com