我在 Visual Studio 中有一个 TypeScript 项目,通过 systemjs 安装了模块。我有以下代码:
应用程序.ts
import { Aurelia } from 'aurelia-framework';
例如,悬停 Aurelia 并按 F12(转到定义)会打开aurelia-framework.d.ts
systemjs 安装的正确文件。但是,当我单击构建时,我得到以下输出:
error TS2307: Build: Cannot find module 'aurelia-router'.
这是我的 tsconfig 供参考。
tsconfig.json
{
"version": "1.8.0",
"compilerOptions": {
"rootDir": "src/",
"outDir": "dist/",
"target": "es5",
"module": "system",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true
}
}