【发布时间】:2016-04-12 20:20:42
【问题描述】:
当我使用时:
import {Component} from 'angular2/core';
从 app.component.ts 我的应用程序将成功运行,但编译器抛出 Error:(1, 25) TS2307: Cannot find module 'angular2/core'而核心文件位于 node_modules/angular2/core 目录中!
当我更改核心目录时,我的应用程序无法运行,但编译器正常! 我正在处理ANGULAR: 5 MIN QUICKSTART
我的 tsconfig.json:
{
"compilerOptions": {
"target": "es6",
"module": "system",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts"
]
}
【问题讨论】:
-
能否提供tsconfig.json文件的内容?谢谢!
标签: typescript angular