Whenever I include the following code in my app.component.ts:
import {Component} from 'angular2/core';
My application runs successfully, but the compiler throws an error saying Error:(1, 25) TS2307: Cannot find module 'angular2/core', even though the core file is located in the node_modules/angular2/core directory!
If I change the core directory, my app stops working, but the compiler works fine! I am currently following the ANGULAR: 5 MIN QUICKSTART.
You can view the project folders structure here.
This is what my tsconfig.json looks like:
{
"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"
]
}