【问题标题】:npm install tries to access wrong host and failsnpm install 尝试访问错误的主机并失败
【发布时间】:2021-11-13 14:46:20
【问题描述】:

我没有做npm install

λ npm install -g pageres-cli
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://calculon:4873/pageres-cli failed, reason: connect ETIMEDOUT 192.168.10.99:4873

calculon 只是我局域网中另一台计算机的名称,它已关闭。与它和当前计算机应该没有关系。

在哪里修复?

【问题讨论】:

  • 检查$home/.npmrc文件的内容(或者如果你的本地项目中有.npmrc,也检查这个文件)如果有一个注册表项指向那台机器

标签: windows npm


【解决方案1】:

好像您在npm 中将calculon 定义为注册表,您可以设置默认的npm 注册表执行此命令:

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

您可以查看使用以下命令定义的注册表:

npm config get registry

【讨论】:

    猜你喜欢
    • 2020-12-27
    • 1970-01-01
    • 2018-10-04
    • 1970-01-01
    • 2015-01-03
    • 1970-01-01
    • 2019-05-10
    • 2018-09-01
    • 2015-01-02
    相关资源
    最近更新 更多