x)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
### Is this a regression?
N/A
### Description
ng update --all fails on a new project
## π¬ Minimal Reproduction
1. install latest angular cli `yarn global add @angular/cli `
2. create a new project `ng new projectname`
3. cd into project
4. run `ng update --all`
5. observe
We shouldn't have any incompatible peer dependencies.
We have two:
1. Package "@angular/core" has an incompatible peer dependency to "zone.js" (requires "~0.9.1", would install "0.10.2").
2. Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.4 <3.6", would install "3.6.4").
## π₯ Exception or Error
Angular CLI: 8.3.14
Node: 10.17.0
OS: linux x64
Angular: 8.2.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.14
@angular-devkit/build-angular 0.803.14
@angular-devkit/build-optimizer 0.803.14
@angular-devkit/build-webpack 0.803.14
@angular-devkit/core 8.3.14
@angular-devkit/schematics 8.3.14
@angular/cli 8.3.14
@ngtools/webpack 8.3.14
@schematics/angular 8.3.14
@schematics/update 0.803.14
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2
Using package manager: 'yarn'
Collecting installed dependencies...
Found 30 dependencies.
Package "@angular/core" has an incompatible peer dependency to "zone.js" (requires "~0.9.1", would install "0.10.2").
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.4 <3.6", would install "3.6.4").
Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later.
On branch master
nothing to commit, working tree clean
## π Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ β³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.3.14
Node: 10.17.0
OS: linux x64
Angular: 8.2.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.14
@angular-devkit/build-angular 0.803.14
@angular-devkit/build-optimizer 0.803.14
@angular-devkit/build-webpack 0.803.14
@angular-devkit/core 8.3.14
@angular-devkit/schematics 8.3.14
@angular/cli 8.3.14
@ngtools/webpack 8.3.14
@schematics/angular 8.3.14
@schematics/update 0.803.14
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2
**Anything else relevant?**
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
$ node --version
v10.17.0
$ npm --version
6.12.0
$ yarn --version
1.19.1
Since TypeScript 3.7 is in RC now, is there any plan on when that will be supported? This ng update problem will resurface once 3.7 is released, right?
I'm experiencing this updating from 7.
Angular CLI: 7.3.9
Node: 12.13.0
OS: linux x64
Angular: 7.2.15
... animations, common, compiler, compiler-cli, core, forms
... 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/cli 7.3.9
@ngtools/webpack 7.3.9
@schematics/angular 7.3.9
@schematics/update 0.13.9
rxjs 6.5.3
typescript 3.6.4
webpack 4.29.0
ng update --all
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.4 <3.6", would install "3.6.4")
Package "@angular/core" has an incompatible peer dependency to "zone.js" (requires "~0.9.1", would install "0.10.2")
Package "@angular/core" has an incompatible peer dependency to "zone.js" (requires "~0.9.1", would install "0.10.2").
Package "@angular-devkit/build-angular" has an incompatible peer dependency to "typescript" (requires ">=3.1 < 3.6", would install "3.6.4")
Any solution so far ?
ok just created a new angular project to see if this bug is still outstanding and yes it is because rxjs
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ β³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.3.17
Node: 12.13.0
OS: linux x64
Angular: 8.2.13
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.17
@angular-devkit/build-angular 0.803.17
@angular-devkit/build-optimizer 0.803.17
@angular-devkit/build-webpack 0.803.17
@angular-devkit/core 8.3.17
@angular-devkit/schematics 8.3.17
@angular/cli 8.3.17
@ngtools/webpack 8.3.17
@schematics/angular 8.3.17
@schematics/update 0.803.17
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2
1$ ng update
Using package manager: 'yarn'
Collecting installed dependencies...
Found 30 dependencies.
We analyzed your package.json, there are some packages to update:
Name Version Command to update
--------------------------------------------------------------------------------
rxjs 6.4.0 -> 6.5.3 ng update rxjs
$ ng update --all
Using package manager: 'yarn'
Collecting installed dependencies...
Found 30 dependencies.
Package "codelyzer" has an incompatible peer dependency to "tslint" (requires "^5.0.0", would install "6.0.0-beta0").
Package "@angular/core" has an incompatible peer dependency to "zone.js" (requires "~0.9.1", would install "0.10.2").
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.4 <3.6", would install "3.7.2").
Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later.
It does build though
$ ng update rxjs
Using package manager: 'yarn'
Collecting installed dependencies...
Found 30 dependencies.
Fetching dependency metadata from registry...
Updating package.json with dependency rxjs @ "6.5.3" (was "6.4.0")...
UPDATE package.json (1304 bytes)
$ time ng build
Generating ES5 bundles for differential loading...
ES5 bundle generation complete.
chunk {main} main-es2015.js, main-es2015.js.map (main) 48.1 kB [initial] [rendered]
chunk {main} main-es5.js, main-es5.js.map (main) 55 kB [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 882 kB [initial] [rendered]
chunk {runtime} runtime-es2015.js, runtime-es2015.js.map (runtime) 6.16 kB [entry] [rendered]
chunk {runtime} runtime-es5.js, runtime-es5.js.map (runtime) 6.2 kB [entry] [rendered]
chunk {styles} styles-es2015.js, styles-es2015.js.map (styles) 10.1 kB [initial] [rendered]
chunk {styles} styles-es5.js, styles-es5.js.map (styles) 14.2 kB [initial] [rendered]
chunk {vendor} vendor-es2015.js, vendor-es2015.js.map (vendor) 3.75 MB [initial] [rendered]
chunk {vendor} vendor-es5.js, vendor-es5.js.map (vendor) 5.21 MB [initial] [rendered]
chunk {polyfills} polyfills-es2015.js, polyfills-es2015.js.map (polyfills) 290 kB [initial] [rendered]
Date: 2019-11-05T17:02:09.660Z - Hash: 3aca6d82d09074d50114 - Time: 13012ms
real 0m17.821s
user 0m20.269s
sys 0m1.442s
Please follow the official update instructions provided here: https://update.angular.io
The -all option is not recommended for general update usage. It will update all dependencies found to their absolute latest version regardless of compatibility.
If any issues are encountered when following the recommended instructions, please open a new issue with additional details.
@clydin Can we show this text (or something like it) when someone runs ng update --all? It would be very helpful.
The --all option is not recommended for general update usage.
It will update all dependencies found to their absolute latest version regardless of compatibility.
@clydin I'm still seeing the following:
Package "@angular-devkit/build-angular" has an incompatible peer dependency to "typescript"
(requires ">=3.6 < 3.7", would install "3.7.2")
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript"
(requires ">=3.6 <3.7", would install "3.7.2")
When running ng update @angular/core @angular/cli --next as per the instructions at https://update.angular.io
@despian I was getting a similar error except it was telling me it required ">=3.1 < 3.6". I ran the following:
npm install typescript@">=3.1 < 3.6"
Once i ran that, @angular-devkit/build-angular and @angular/cli updated just fine but it's obviously saying that my typescript version is out of date. Project seems to be building fine as well, but I'm anxiously awaiting typescript errors since I dropped from 3.7.2 to 3.5.3.... I'll keep you posted...
@davidshanline so my issue was due to the fact I had the following in my package.json:
"typescript": "^3.5.3",
This was allowing the latest version of typescript ("3.7.2") to be installed which was causing the problem.
I changed my package.json to:
"typescript": "~3.6.4",
and this solved the problem for me.
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._
Most helpful comment
@clydin Can we show this text (or something like it) when someone runs
ng update --all? It would be very helpful.