I am trying 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 during the execution of the project.
Below are the steps that 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 TypeScript package), and I encounter some errors / warnings in the code.
Error # 1
Classes with @Component decorators show the following error:
Experimental decorator support is a feature that may be changed in a future version. Set the parameter "experimentalDecorators" to remove this warning.
(it ignores the string "experimentalDecorators": true in tsconfig.json)
Error # 2
In src / client / app / about / about.component.ts, for example, in the line:
moduleId: module.id,
Sublime shows this error:
Cannot find the name 'module'.
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 }
package.json
https://github.com/mgechev/angular2-seed/blob/27db8a19f70470f5110482df1a4debc1100ec347/package.json
Why do I have these 2 errors? I can develop, but it is not very nice.