gpt4 book ai didi

node.js - NPM,从错误的URL地址下载依赖项

转载 作者:太空宇宙 更新时间:2023-11-04 02:51:56 26 4
gpt4 key购买 nike

在处理一些项目后,我的 npm 开始从全局错误的地址下载依赖项:

npm install -g bower

npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://172.168.1.1/bower failed, reason:
connect ETIMEDOUT 172.168.1.1
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:

有什么方法可以将下载地址重置为默认地址吗?

我使用的是 Windows 版本的 NodeJS

最佳答案

看起来您的 registry npm 配置选项指向了错误的位置。一定是https://registry.npmjs.org ,使用以下命令检查:

npm config get registry

如果您的注册表不同,请使用以下命令正确设置:

npm config set registry https://registry.npmjs.org/

关于node.js - NPM,从错误的URL地址下载依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53664085/

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