【发布时间】:2017-07-24 21:14:57
【问题描述】:
我将 nodejs 更新到最新版本后,尝试运行 npm install 安装软件包时总是出错:
npm WARN registry Using stale data from http://registry.npmjs.org/ because the host is inaccessible -- are you offline?
npm WARN registry Using stale package data from http://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.npmjs.org/escope failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:80
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'
我的 Internet 连接没有任何问题,我禁用了到 https:https://registry.npmjs.org 的路由并将其替换为 http - 第一次安装有效,但在开始后立即无法再次安装。
节点版本8.2.1
npm 版本5.3.0
感谢您的帮助。
【问题讨论】:
标签: node.js npm npm-install