Networking 我无法使用npm安装任何节点包

Networking 我无法使用npm安装任何节点包,networking,npm,dns,Networking,Npm,Dns,我将我的npm升级到了最新版本,现在我无法再次运行任何npm命令,我卸载了node js并再次下载了它, 当我运行npm安装-g时ionic@latest我在命令提示符中遇到此错误: npm WARN deprecated ionic@5.4.16: The Ionic CLI now uses ✨ @ionic/cli ✨ for its package name! This is a case where reading the error message carefully can hel

我将我的npm升级到了最新版本,现在我无法再次运行任何npm命令,我卸载了node js并再次下载了它, 当我运行
npm安装-g时ionic@latest
我在命令提示符中遇到此错误:

npm WARN deprecated ionic@5.4.16: The Ionic CLI now uses ✨ @ionic/cli ✨ for its package name! This is a case where reading the error message carefully can help. The key line is

npm ERR! network request to https://registry.npmjs.org/env-paths failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org

ENOTFOUND is a message delivered by your OS to npm. It means npm's attempt to use the Domain Name Service (DNS) to look up that registry machine's hostname failed.

So, you have a networking-connectivity problem, or, less likely, a firewall problem. Try this on a command line on your machine.

curl https://registry.npmjs.org

npm警告已弃用ionic@5.4.16:离子CLI现在使用✨ @爱奥尼亚/cli✨ 它的包名 在这种情况下,仔细阅读错误消息会有所帮助。关键是

npm错误!对的网络请求失败,原因:getaddrinfo ENOTFOUND registry.npmjs.org

ENOTFOUND是操作系统向npm传递的消息。这意味着npm尝试使用域名服务(DNS)查找注册表计算机的主机名失败

因此,您存在网络连接问题,或者,不太可能存在防火墙问题。在计算机上的命令行上尝试此操作

如果它也不起作用,试着重新启动你的机器。如果这不起作用,请向网络工程师寻求帮助,并提及curl命令作为问题的证据

一些家庭ISP(我在看你,Comcast)有时会出现连接问题,表现为DNS故障。关闭电缆调制解调器和路由器的电源。如果没有帮助,请致电技术支持,让他们远程重置调制解调器

如果您正在使用VPN,请尝试断开与它的连接,然后再次尝试npm操作。如果它在没有VPN的情况下工作,请向维护VPN的人员寻求帮助


从我所在的位置访问该主机名没有问题。

我的网络运行良好,我没有在防火墙后面,也没有使用vpn