【问题标题】:Unable to read typings for "es6-shim"无法读取“es6-shim”的类型
【发布时间】:2016-12-13 19:22:14
【问题描述】:

您好,在尝试“npm install”命令时,我遇到了这个错误:

无法读取“es6-shim”的类型。您应该检查“es6-shim.d.ts”中的入口路径是否是最新的

由无法连接到“https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/9807d9b701f58be068cb07833d2b24235351d052/es6-shim/es6-shim.d.ts”引起

由连接 ETIMEDOUT 10.10.34.36:443 引起

typings.json:

{
  "globalDependencies": {
    "es6-shim": "registry:dt/es6-shim#0.31.2+20160602141504"
  }
}

我在这里做错了什么?

【问题讨论】:

  • 您可以自己在浏览器中访问该 URL 吗?
  • @RichardSzalay 是的,我可以

标签: angularjs npm-install typescript-typings


【解决方案1】:

10.10.34.36:443 表示 https://raw.githubusercontent.com 在您所在的国家/地区被过滤/审查。但是现在有更好的方法来管理它。根据 TS 的新建议是使用 NPM 来管理您的 Typings:

npm install --save-dev @types/core-js

和安装普通的npm包一样,只是开头有@types/。您可以在node_modules\@types文件夹中找到已安装的包。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-28
    • 2019-05-08
    • 1970-01-01
    • 2016-11-28
    • 1970-01-01
    • 2021-11-20
    • 2023-01-31
    • 2018-06-15
    相关资源
    最近更新 更多