我正在尝试一个示例 angular2 应用程序:
https://github.com/thelgevold/angular-2-samples
文件夹结构:
当我运行时:
\angular-2-samples>tsc -m commonjs -t es5 --emitDecoratorMetadata --experimentalDecorators --jsx react app.ts
一切都很好,但是当我跑步时
\application\app\typescript>tsc -m commonjs -t es5 --emitDecoratorMetadata --expe
rimentalDecorators --jsx react app.ts
app.ts(1,30): error TS2307: Cannot find module 'angular2/http'.
app.ts(2,51): error TS2307: Cannot find module 'angular2/angular2'.
app.ts(3,141): error TS2307: Cannot find module 'angular2/router'.
user/listen.ts(1,25): error TS2307: Cannot find module 'angular2/angular2'.
user/listen.ts(2,27): error TS2307: Cannot find module 'angular2/router'.
user/listen.ts(3,33): error TS2307: Cannot find module 'angular2/router'.
user/settings.ts(1,25): error TS2307: Cannot find module 'angular2/angular2'.
user/settings.ts(2,27): error TS2307: Cannot find module 'angular2/router'.
user/settings.ts(3,33): error TS2307: Cannot find module 'angular2/router'.
user/wishlist.ts(1,25): error TS2307: Cannot find module 'angular2/angular2'.
user/wishlist.ts(2,27): error TS2307: Cannot find module 'angular2/router'.
user/wishlist.ts(3,33): error TS2307: Cannot find module 'angular2/router'.
我们都有相同的类型文件夹:
可能是什么问题?