Angular-cli: Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.3", would install "3.4.5").

Created on 14 May 2019  路  3Comments  路  Source: angular/angular-cli

馃悶 Bug report

Command (mark with an x)


- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?


Yes, the previous version in which this bug was not present was: ....

Description

A clear and concise description of the problem...
I've tried using this link: https://github.com/angular/angular-cli/issues/13095#, but it didint help, as my commands in the CLI, can be seen below.

馃敩 Minimal Reproduction

```bash
npm install
npm install @angular/core

npm install -g @angular/cli
npm i @angular/compiler-cli
npm i @angular/[email protected]
npm audit fix
ng update --all
npm i @angular/core
npm install zone
ng update --all
npm install @angular/[email protected]
ng update --all --force
npm install zone.js@~0.8.26
npm install typescript@>=3.1.1
npm i typescript@"<3.2"
npm audit fix
npm install typescript@">=3.1.1 <3.2"
ng update --all --force
ng update @angular/cli @angular/core
npm i [email protected] --save-dev --save-exact
ng update @angular/cli
npm i [email protected]
ng update --all --force

馃敟 Exception or Error

 npm i [email protected]
npm WARN @angular/[email protected] requires a peer of zone.js@~0.8.26 but none is installed. You must install peer dependencies yourself.
 Package "@angular/core" has an incompatible peer dependency to "zone.js" (requires "~0.8.26", would install "0.9.1")
                  Package "@angular/core" has an incompatible peer dependency to "zone.js" (requires "~0.8.26", would install "0.9.1").
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.3", would install "3.4.5")
 Package "@angular/core" has an incompatible peer dependency to "zone.js" (requires "~0.8.26", would install "0.9.1").
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.3", would install "3.4.5").
    Updating package.json with dependency zone.js @ "0.9.1" (was "0.8.29")...
    Updating package.json with dependency typescript @ "3.4.5" (was "3.1.6")...
UPDATE package.json (1552 bytes)
npm WARN @angular/[email protected] requires a peer of typescript@>=3.1.1 <3.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of zone.js@~0.8.26 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/[email protected] requires a peer of typescript@>=2.4.0 < 3.3 but none is installed. You must install peer dependencies yourself.
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.3", would install "3.4.5").
    Updating package.json with dependency typescript @ "3.4.5" (was "3.2.4")...
UPDATE package.json (1552 bytes)
npm WARN @angular/[email protected] requires a peer of typescript@>=3.1.1 <3.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of zone.js@~0.8.26 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/[email protected] requires a peer of typescript@>=2.4.0 < 3.3 but none is installed. You must install peer dependencies yourself.

updated 1 package and audited 42671 packages in 19.181s
found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

updated 2 packages and audited 42671 packages in 18.769s
found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
npm WARN @angular/[email protected] requires a peer of zone.js@~0.8.26 but none is installed. You must install peer dependencies yourself.

+ [email protected]
updated 1 package and audited 42671 packages in 21.583s
found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details


+ [email protected]
updated 1 package and audited 42671 packages in 21.583s
found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

Incompatible peer dependencies found. See above.
   Package "@angular/core" has an incompatible peer dependency to "zone.js" (requires "~0.8.26", would install "0.9.1").
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.3", would install "3.4.5").
Incompatible peer dependencies found. See above.

馃實 Your Environment

Angular CLI: 7.3.9
Node: 10.15.3



Angular: 7.2.15

Anything else relevant?

Angular CLI: 7.3.9
Node: 10.15.3
OS: win32 x64
Angular: 7.2.15
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.13.9
@angular-devkit/build-angular 0.13.9
@angular-devkit/build-optimizer 0.13.9
@angular-devkit/build-webpack 0.13.9
@angular-devkit/core 7.3.9
@angular-devkit/schematics 7.3.9
@angular/cdk 7.3.7
@angular/cli 7.3.9
@ngtools/webpack 7.3.9
@schematics/angular 7.3.9
@schematics/update 0.13.9
rxjs 6.5.2
typescript 3.4.5
webpack 4.29.0

All 3 comments

Hi @maschinedreams, thanks for reporting this. However, I am going to close this in favor of #13095, since it essentially is the same problem.

I'll put a link in the above mentioned issue to your issue.

Thanks.

@alan-agius4 but she told that she wasn't successful with those solutions so probably this is a new issue. What's the solution? It's a bit odd I can't upgrade to Angular 8 ...

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