I try to start a new project in Angular 2 on Windows based on the following repository: https://github.com/mgechev/angular2-seed
Everything works fine (npm install, npm start, ...) except that Sublime Text 3 shows me some errors that are not present when I execute the project.
Here are the steps I followed:
$ git clone https://github.com/mgechev/angular2-seed.git
$ cd angular2-seed
$ npm install
Then I open the project with Sublime Text (with the TypeScript package) and I face some errors/warnings in the code.
Error #1
Classes with @Component decorators show the following error:
Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.
(it ignores the line "experimentalDecorators": true in tsconfig.json)
Error #2
In src/client/app/about/about.component.ts for example, on the line:
moduleId: module.id,
Sublime shows this error:
Cannot find name 'module'.
The tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "es2015", "dom"],
"sourceMap": true,
"pretty": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"typeRoots": [
"./node_modules/@types",
"./node_modules"
],
"types": [
"node"
]
},
"exclude": [
"node_modules",
"dist",
"src"
],
"compileOnSave": false
}
The package.json
https://github.com/mgechev/angular2-seed/blob/27db8a19f70470f5110482df1a4debc1100ec347/package.json
Do you why I have this 2 errors? I can develop but it's not very pleasant.