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

Node.js NPM,从错误的URL地址下载依赖项,node.js,npm,Node.js,Npm,在处理某个项目后,我的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 t

在处理某个项目后,我的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

看起来您的
注册表
npm配置选项指向了错误的位置。必须是,请使用以下命令进行检查:

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

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

看起来您的
注册表
npm配置选项指向了错误的位置。必须是,请使用以下命令进行检查:

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

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

检查
注册表
配置设置:
npm config get registry
。它必须是@alexmac是的,它有这个地址。如何删除?此地址表示172.168.1.1?如果是这样,请使用以下命令:
npm config set registryhttps://registry.npmjs.org/
@alexmac成功了。非常感谢。你能用详细的描述来回答我吗?这样我就可以接受了?这可能对其他用户有所帮助。请检查
registry
config设置:
npm config get registry
。它必须是@alexmac是的,它有这个地址。如何删除?此地址表示172.168.1.1?如果是这样,请使用以下命令:
npm config set registryhttps://registry.npmjs.org/
@alexmac成功了。非常感谢。你能用详细的描述来回答我吗?这样我就可以接受了?这可以帮助其他用户。