打字稿|无法安装类型脚本

时间:2018-09-01 13:18:33

标签: node.js typescript npm

enter image description here无法安装带有以下错误的打字稿:

npm WARN注册表由于重新验证期间发生请求错误,因此使用了https://registry.npmjs.org/中的过时数据包数据。

npm错误!代码E500

npm错误! 500 Internal Server Error:typescript @ https://registry.npmjs.org/typescript/-/typescript-3.0.1.tgz

npm错误!可以在以下位置找到此运行的完整日志:

npm错误! C:\ Users \ Sony \ AppData \ Roaming \ npm-cache_logs \ 2018-09-01T13_12_48_404Z-debug.log

1 个答案:

答案 0 :(得分:3)

这是一个全球性问题。他们说它将在周末here

修复

临时解决方案:

打开终端 dig registry.npmjs.com @1.1.1.1

它将为您提供IP地址。比 将其添加到您的etc / hosts文件中。

How to add IP address to etc/hosts OSX/Linux/Windows

可能需要重新启动。之后,您可以使用npm
它对我有用。

更新

问题已解决。您可以从etc / hosts文件中删除该行。

相关问题