我将我的 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'
我没有网络连接问题,我禁用了到https:https://registry.npmjs.org的路由,并将其替换为http。第一次安装成功后,立即停止工作。
node版本
8.2.1
npm版本5.3.0
感谢任何帮助。