angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

typescript 2.8.3

Open bbuehrer opened this issue 8 years ago • 9 comments

Is it compatible with typescript 2.8.3 ?

bbuehrer avatar May 14 '18 11:05 bbuehrer

@bbuehrer With me give not compile first time and after a change work well.
https://github.com/angular/angular-cli/issues/10836

It is suggest typescript version: The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0

Toso82 avatar May 14 '18 12:05 Toso82

I have also

ERROR in The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0 but 2.8.3 was found instead.

Angular and cli are up-to-date versions.

norbert-tasi avatar May 16 '18 20:05 norbert-tasi

Same here. It would be nice to have this error downgraded to a warning. It seems to be a bug in the build process more than anything else. As of right now its holding us back from upgrading to Angular 6.

DSchroer avatar May 17 '18 13:05 DSchroer

The Angular AOT Compiler v6.0.x only officially supports TypeScript 2.7.x. Using any other version is not guaranteed to function properly. However, if using TypeScript 2.8 is preferred, the error can be disabled by using the disableTypeScriptVersionCheck option within angularCompilerOptions inside the application's tsconfig.

clydin avatar May 17 '18 14:05 clydin

@clydin : Error: tsconfig.json(11,5): error TS5023: Unknown compiler option 'disableTypeScriptVersionCheck'.

bbuehrer avatar May 17 '18 15:05 bbuehrer

Worked for me. Make sure that you set it in tsconfig.app.json and not tsconfig.json.

"angularCompilerOptions": {
    "disableTypeScriptVersionCheck": true
}

DSchroer avatar May 17 '18 15:05 DSchroer

Example of an augmented new project application's config:

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "module": "es2015",
    "types": []
  },
  "exclude": [
    "src/test.ts",
    "**/*.spec.ts"
  ],
  "angularCompilerOptions": {
    "disableTypeScriptVersionCheck": true
  }
}

Might also want to run ng config cli.warnings.typescriptMismatch false to silence the warning as well.

clydin avatar May 17 '18 15:05 clydin

Ok, i set it in the tsconfig.app.json and it work. Thanks

bbuehrer avatar May 18 '18 07:05 bbuehrer

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.