I have installed angular 2 using the cookbook from angular2's official website, but i a facing a problem when i try to import external modules. I have different npm packages, but with them all i get the error in the title:
cannot find module 'angular2/core'.
i have installed the package with the npm install function:
npm install angular2-infinite-scroll --save
am i doing somthing wrong? or do i need to change some configuration somewhere? Here is a link to the package i try to install: https://www.npmjs.com/package/angular2-infinite-scroll
Here are my tsconfig file:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"isolatedModules": false,
"baseUrl": ".",
"paths": {
"components/*": [
"app/Components/"
],
"models/*": [
"app/Models/"
],
"service/*": [
"app/Services/"
]
}
},
"exclude": [
"node_modules",
"wwwroot"
],
"compileOnSave": true
}
when i look at the files that thorws an error i can see that they are located in somthing called TypeScript Virtual Projects, but i cannot see them in the solution explorer. My tsconfig, and typings.json is in the project root folder, mean while my main, app.module and app.component is in the app root folder.