Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular cli 1.6 and Typescript 2.5.3 warning #8768

Closed
2beers opened this issue Dec 7, 2017 · 8 comments
Closed

Angular cli 1.6 and Typescript 2.5.3 warning #8768

2beers opened this issue Dec 7, 2017 · 8 comments

Comments

@2beers
Copy link

@2beers 2beers commented Dec 7, 2017

I've recently updated to Angular 5.1.0 and Angular CLI 1.6.0 which is supposed to be typescript 2.5 friendly however I'm receiving the following warning

@angular/compiler-cli@5.1.0 requires typescript@'>=2.4.2 <2.5.0' but 2.5.3 was found instead.

Versions

Angular CLI: 1.6.0
Node: 7.9.0
OS: win32 x64
Angular: 5.1.0
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router

@angular/cli: 1.6.0
@angular-devkit/build-optimizer: 0.0.35
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.41
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.0
@schematics/angular: 0.1.10
@schematics/schematics: 0.0.10
typescript: 2.5.3
webpack: 3.10.0
  "dependencies": {
    "@angular/animations": "^5.1.0",
    "@angular/common": "^5.1.0",
    "@angular/compiler": "^5.1.0",
    "@angular/core": "^5.1.0",
    "@angular/forms": "^5.1.0",
    "@angular/http": "^5.1.0",
    "@angular/platform-browser": "^5.1.0",
    "@angular/platform-browser-dynamic": "^5.1.0",
    "@angular/platform-server": "^5.1.0",
    "@angular/router": "^5.1.0",
    "core-js": "^2.5.1",
    "rxjs": "^5.5.5",
    "zone.js": "^0.8.18"
  },
  "devDependencies": {
    "@angular/cli": "^1.6.0",
    "@angular/compiler-cli": "^5.1.0",
    "@types/jasmine": "2.5.38",
    "@types/node": "^6.0.92",
    "codelyzer": "~3.0.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "^1.7.1",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "^1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.0.4",
    "tslint": "~5.3.2",
    "typescript": "~2.5.0"
  }

Repro steps

  • ng serve --aot
@cexbrayat
Copy link
Contributor

@cexbrayat cexbrayat commented Dec 7, 2017

Will be fixed by #8766

@brian428
Copy link

@brian428 brian428 commented Dec 8, 2017

In case the team isn't aware, TS is already up to 2.6.2. So even expanding the peer dependency range to <2.6 is already outdated. So the range probably should become <2.7?

@mvhecke
Copy link

@mvhecke mvhecke commented Dec 11, 2017

@brian428 Angular itself doesn't support 2.6 yet, this will arrive in one of the upcoming minor releases. https://blog.angular.io/angular-5-1-more-now-available-27d372f5eb4e

@kylecordes
Copy link

@kylecordes kylecordes commented Dec 11, 2017

Is there some way to make CLI not add its own additional requirement on top of what the underlying package requires? It was pointed out over in the Angular repo that the Angular package already has the correct dependency. I'd rather see CLI just accept the upstream requirement from Angular itself, rather than have things like this that have to be changed to match Angular, if possible?

@jtsom
Copy link
Contributor

@jtsom jtsom commented Dec 14, 2017

So this didn't make it into the 1.6.1 release?

@devoto13
Copy link
Contributor

@devoto13 devoto13 commented Dec 14, 2017

I agree with @kylecordes that this warning is probably redundant as Angular already requires correct version using peerDependencies. Tested with CLI 1.6.1:

$ ng new tsv
$ cd tsv
# edit package.json to install typescript 2.6.1
$ npm i
npm WARN @angular/compiler-cli@5.1.1 requires a peer of typescript@>=2.4.2 <2.6 but none is installed. You must install peer dependencies yourself.
npm WARN tsickle@0.25.5 requires a peer of typescript@>=2.4.2 <2.6 but none is installed. You must install peer dependencies yourself.
@Brocco Brocco closed this in #8792 Dec 14, 2017
@hw1999
Copy link

@hw1999 hw1999 commented Sep 14, 2018

I got the same kind of warning. Do you have good solution to solve this typescript mismatch?
............................................................................................................................
$ ng build "--prod"
@angular/compiler-cli@6.1.7 requires typescript@'>=2.7.0 <2.8.0' but 2.9.2 was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.
Please run the following command to install a compatible version of TypeScript.
npm install typescript@'>=2.7.0 <2.8.0'
To disable this warning run "ng config cli.warnings.typescriptMismatch false".

@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Sep 8, 2019

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

9 participants
You can’t perform that action at this time.