尝试在 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.
我做错了什么,导致该文件不在预期的位置?
最佳答案
a.) 请更新 tsd npm update tsd -g
。
b.) 要重新安装并保存到 tsd.d.ts,您需要使用 save
选项:https://github.com/DefinitelyTyped/tsd#reinstall-definitions
tsd 重新安装 -so
关于angular - 在 ngconf2015demo 上执行 tsc 时出错 - 缺少 tsd.d.ts,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30251252/