Currently, I am in the process of developing an Angular 2 application
Here is a snippet of the TypeScript code that I have written:
import { Component } from 'angular2/core';
@Component({
selector: 'my-app',
template: ' < h1 > My First SharePoint Add In using Angular2... !!! < /h1>'
})
export class AppComponent { }
However, I am encountering the following errors:
cannot find module angular2/core
The experimental support for decorators may change in a future update
To address the second error, I have included the following line in my tsconfig.json file:
"experimentalDecorators": true,
In an attempt to resolve this issue, I have installed TypeScript SDK for Visual Studio 2017, restarted Visual Studio, but unfortunately, the problem persists
I have also tried running npm install -g typescript@latest
Below is an overview of my package.json file:
{
"name": "imageslideshow",
"version": "1.0.0",
"description": "slide show for image libraries",
"main": "index.js",
"dependencies": {
"@angular/core": "^4.3.2",
"angular2": "^2.0.0-beta.17",
"es6-promise": "^4.1.1",
"es6-shim": "^0.35.3",
"reflect-metadata": "^0.1.2",
"rxjs": "^5.0.0-beta.6",
"systemjs": "^0.20.17",
"zone.js": "^0.8.16"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "vignesh",
"license": "ISC"
}
Upon running npm install, I received the message displayed at https://i.stack.imgur.com/xTP8C.png