【问题标题】:Error executing tsc on ngconf2015demo - missing tsd.d.ts在 ngconf2015demo 上执行 tsc 时出错 - 缺少 tsd.d.ts
【发布时间】:2015-05-15 03:53:50
【问题描述】:

尝试在 Windows 上使用 Visual Studio 2015RC 设置 Angular2,并按照TodoMVC application demo for ng-conf 2015 的说明,我到达tsd reinstall 产生以下输出的地步:

c:\...>tsd reinstall
>> tsd 0.5.7
-> running reinstall
>> written 1 file:
    - angular2/angular2.d.ts

它会创建typings 文件夹,但里面唯一的就是上面的angular2/angular2.d.ts

tsd.json的内容是:

{
  "version": "v4",
  "repo": "borisyankov/DefinitelyTyped",
  "ref": "master",
  "path": "typings",
  "bundle": "typings/tsd.d.ts",
  "installed": {
    "angular2/angular2.d.ts": {
      "commit": "b3834d886a95789e6ab56e8244775ec10c5293d0"
    }
  }
}

所以当我尝试执行下一个命令时,按照演示设置步骤tsc,我收到此错误:

C:\...> tsc
error TS6053: File 'typings/tsd.d.ts' not found.

我做错了什么,导致该文件不在预期的位置?

【问题讨论】:

    标签: angular typescript visual-studio-2015 tsd


    【解决方案1】:

    a.) 请更新 tsd npm update tsd -g。

    b.) 要重新安装并保存到 tsd.d.ts,您需要使用 save 选项:https://github.com/DefinitelyTyped/tsd#reinstall-definitions

    tsd reinstall -so

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-23
      • 1970-01-01
      • 1970-01-01
      • 2018-05-21
      • 2021-05-26
      相关资源
      最近更新 更多