Currently, I am utilizing angular version 2.0.0-rc.1, however, I am encountering issues with the typescript compiler (Typescript version 1.8.10). Whenever I run tsc on my project, I am bombarded with numerous errors similar to this one:
app/app.component.ts(1,33): error TS2307: Cannot find module '@angular/core'
Nevertheless, I firmly believed that since the package.json
in node_modules/@angular/core includes the line:
"typings": "index.d.ts",
and index.d.ts
contains the definitions, this issue should not persist. Interestingly, VSCode does not highlight any problems with these packages and successfully navigates to the source files when I click on "Go to Definition" for imports.
What steps can I take to prevent such compiler errors from occurring?
Update:
This is how my packages.json
appears:
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"sourceMap": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true
},
"exclude": [
"node_modules",
"platforms"
]
}