Angular-cli: Incompatible peer dependencies found when updating a brand new project

Created on 6 Jun 2018  路  7Comments  路  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Area

- [ ] devkit
- [x] schematics

Versions

Angular CLI: 6.0.8
Node: 8.9.0
OS: linux x64
Angular: 6.0.4

Repro steps

ng new my-proj
cd my-proj
ng update --all

The log given by the failure

                  Package "karma-jasmine-html-reporter" has a missing peer dependency of "jasmine" @ ">=3".
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.8", would install "2.9.1").
Incompatible peer dependencies found. See above.

Desired functionality

To have a successful message.

Most helpful comment

Hi @hansl,

In a new project, if we run just ng update is says that there is nothing to update, but if we use the flag --all it gives this "incompatible peer dependency" error. It looks contradictory or at least confusing for me. Shouldn't the --all flag just execute what is at the ng update list? And do nothing if it is empty?

All 7 comments

I also ran into this issue and trying to install typescript 2.8 installs version 2.8.4 which also gives an error.

Also seeing this when _migrating an older project_.

Versions

Angular CLI: 6.0.8
Node: 8.9.4
OS: OSX 10.13.5
Angular: 4.4.7

Repro steps

ng update --all

The log given by the failure

                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.8", would install "2.9.1")
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.8", would install "2.9.1").
Incompatible peer dependencies found. See above.

Hi @aphexddb,

Unfortunately, this one comes down as a feature. ng update --all will still validate that all dependencies are compatible with each others, but typescript's latest is 2.9, which isn't compatible with Angular's compiler. You can use ng update --all --force to force the update, or just update dependencies one at a time.

Now there's a case to be made that --all should be smarter and only update compatible versions. I think we need a feature in the future (e.g. --smart) that would do that, but in the meantime this is the best that makes sense.

Closing this as working as intended.

Hi @hansl,

In a new project, if we run just ng update is says that there is nothing to update, but if we use the flag --all it gives this "incompatible peer dependency" error. It looks contradictory or at least confusing for me. Shouldn't the --all flag just execute what is at the ng update list? And do nothing if it is empty?

ame error updating an existing project from angular 5.2 to 6.0.4

Any news on this? I installed Typescript 3.1.6 as a workaround and have no problems.

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._

Was this page helpful?
0 / 5 - 0 ratings