x
)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Yes, the previous version in which this bug was not present was: ....
Updating angular cli from 8.0.6
to 8.1.0
also updates other angular packages to 8.2.0-next.0
(next
npm tag)
A clear and concise description of the problem...
The cli should update to latest
instead of next
npm tag.
create a angular workspace with angular 8.0.6 and upgrade to 8.1.0
npx -p @angular/[email protected] ng new bug
cd bug
npx -p @angular/[email protected] ng update @angular/cli
Using package manager: 'yarn'
Collecting installed dependencies...
Found 81 dependencies.
Fetching dependency metadata from registry...
Package "ng-packagr" has an incompatible peer dependency to "@angular/compiler-cli" (requires "^6.0.0 || ^7.0.0 || ^8.0.0-beta.0 || ^8.1.0-beta.0" (extended), would install "8.2.0-next.0").
Package "@angular/cdk" has an incompatible peer dependency to "@angular/common" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.0").
Package "jest-preset-angular" has an incompatible peer dependency to "@angular/core" (requires ">=2.0.0", would install "8.2.0-next.0").
Package "ng-packagr" has an incompatible peer dependency to "@angular/compiler" (requires "^6.0.0 || ^7.0.0 || ^8.0.0-beta.0 || ^8.1.0-beta.0" (extended), would install "8.2.0-next.0").
Package "jest-preset-angular" has an incompatible peer dependency to "@angular/platform-browser-dynamic" (requires ">=2.0.0", would install "8.2.0-next.0").
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.
Angular CLI: 8.0.6
Node: 10.15.0
OS: win32 x64
Angular: 8.1.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.800.6
@angular-devkit/build-angular 0.800.6
@angular-devkit/build-ng-packagr 0.800.6
@angular-devkit/build-optimizer 0.800.6
@angular-devkit/build-webpack 0.800.6
@angular-devkit/core 8.0.6
@angular-devkit/schematics 8.0.1
@angular/cdk 8.0.2
@angular/cli 8.0.6
@ngtools/json-schema 1.2.0
@ngtools/webpack 8.0.6
@schematics/angular 8.0.1
@schematics/update 0.800.6
ng-packagr 5.3.0
rxjs 6.5.2
typescript 3.4.5
webpack 4.30.0
Anything else relevant?
Same error.
I had the exact same issue, but resolved now .
My environment was:
Angular CLI: 7.3.9
Node: 9.11.1
OS: linux x64
Angular: 8.1.0
... 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.801.0
@angular-devkit/build-optimizer 0.801.0
@angular-devkit/build-webpack 0.801.0
@angular-devkit/core 7.3.9
@angular-devkit/schematics 7.3.9
@angular/cli 7.3.9
@ngtools/webpack 8.1.0
@schematics/angular 7.3.9
@schematics/update 0.13.9
rxjs 6.5.2
typescript 3.4.5
webpack 4.35.2
ng update
showed me 1 package to update:
Name Version Command to update
--------------------------------------------------------------------------------
@angular/cli 7.3.9 -> 8.1.0 ng update @angular/cli
Running ng update @angular/cli
I would get this every time:
Package "ag-grid-angular" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.1.x" (extended), would install "8.2.0-next.0").
Package "ag-grid-angular" has an incompatible peer dependency to "@angular/core" (requires ">=2.1.x" (extended), would install "8.2.0-next.0").
However when I ran ng update @angular/cli @angular/core
, it did the trick, and updated the package.
My environment now is:
Angular CLI: 8.1.0
Node: 9.11.1
OS: linux x64
Angular: 8.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.801.0
@angular-devkit/build-angular 0.801.0
@angular-devkit/build-optimizer 0.801.0
@angular-devkit/build-webpack 0.801.0
@angular-devkit/core 8.1.0
@angular-devkit/schematics 8.1.0
@ngtools/webpack 8.1.0
@schematics/angular 8.1.0
@schematics/update 0.801.0
rxjs 6.5.2
typescript 3.4.5
webpack 4.35.2
Could you provide the dependency sections of the project's package.json
?
@clydin - sure, here they are:
"dependencies": {
"@angular/animations": "~8.1.0",
"@angular/common": "~8.1.0",
"@angular/compiler": "~8.1.0",
"@angular/core": "~8.1.0",
"@angular/forms": "~8.1.0",
"@angular/platform-browser": "~8.1.0",
"@angular/platform-browser-dynamic": "~8.1.0",
"@angular/router": "~8.1.0",
"ag-grid-angular": "^21.0.1",
"ag-grid-community": "^21.0.1",
"ag-grid-enterprise": "^21.0.1",
"core-js": "^2.6.9",
"rxjs": "~6.5.2",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.801.0",
"@angular/cli": "^8.1.0",
"@angular/compiler-cli": "~8.1.0",
"@angular/language-service": "~8.1.0",
"@types/jasmine": "^3.3.13",
"@types/jasminewd2": "~2.0.6",
"@types/node": "^11.13.15",
"codelyzer": "^5.0.1",
"jasmine-core": "~3.3.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.5",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.2",
"ts-node": "~8.0.3",
"tslint": "~5.14.0",
"typescript": "~3.4.5"
}
I have a similar issue. I installed @angular/cli 8.1.0
globally yesterday. Updated a project today using ng update @angular/cli
, and it installed Angular 8.2.0-next.0 for all my dependencies.
"dependencies": {
"@angular/animations": "8.2.0-next.0",
"@angular/common": "8.2.0-next.0",
"@angular/compiler": "8.2.0-next.0",
"@angular/core": "8.2.0-next.0",
"@angular/forms": "8.2.0-next.0",
"@angular/platform-browser": "8.2.0-next.0",
"@angular/platform-browser-dynamic": "8.2.0-next.0",
"@angular/router": "8.2.0-next.0",
"core-js": "^2.6.5",
"rxjs": "^6.5.2",
"tslib": "^1.9.3",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.801.0",
"@angular/cli": "8.1.0",
"@angular/compiler-cli": "8.2.0-next.0",
"@angular/language-service": "8.2.0-next.0",
...
My Angular versions were 8.0.3, the CLI version was 8.0.4.
The application built, and the unit tests passed, so I am not too worried. But, it is odd.
I had the same issue when updating from 7.2.14 to 8.1.0
Removing the @angular/http package fixed this for me (allowing me to run the ng update command)
npm un @angular/http
Removing @angular/http
didn't work for me. Same with ng update @angular/cli @angular/core
Ive seen the same issue with my projects.
Same issue here...
Also happening here and I couldn't find a way to make ng update
uninstall 8.2.0-next and install 8.1.0 instead. I had to manually change in package.json.
Same issue here, ng update cli and core didn't worked, don't want to remove @angulat/http
@krischan1410 you may update it to @angular/common/http
as the v8 Upgrade Guideline says.
In the other hand, I'm seeing this error for every new minor release since some time ago, the CLI must discard the next
releases :-?
Issue had fix when i use the following command with --force
flag..
ng update @angular/cli @angular/core --force
@matheo Thanks for the hint: Now I see that I don't use @angular/http at all. So removing it is not a bug fix for my environment :-)
Same issue here:
Angular CLI: 8.0.6
Node: 10.16.0
OS: darwin x64
Angular: 8.1.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.800.6
@angular-devkit/build-angular 0.800.6
@angular-devkit/build-optimizer 0.800.6
@angular-devkit/build-webpack 0.800.6
@angular-devkit/core 8.0.6
@angular-devkit/schematics 8.0.6
@angular/cdk 8.0.2
@angular/cli 8.0.6
@angular/material 8.0.2
@angular/material-moment-adapter 8.0.2
@ngtools/webpack 8.0.6
@schematics/angular 8.0.6
@schematics/update 0.800.6
rxjs 6.5.2
typescript 3.4.5
webpack 4.30.0
Error when running ng update @angular/cli :
Using package manager: 'npm'
Collecting installed dependencies...
Found 55 dependencies.
Fetching dependency metadata from registry...
Package "@angular/material" has an incompatible peer dependency to "@angular/animations" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.0").
Package "@angular/cdk" has an incompatible peer dependency to "@angular/core" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.0").
Package "@angular/cdk" has an incompatible peer dependency to "@angular/common" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.0").
Package "@angular/material" has an incompatible peer dependency to "@angular/forms" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.0").
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.
Update 1: solved by deleting node_modules/ and package-lock.json and running a fresh npm install
Update 2: Same error on another of our projects, the solution above didn't work for it
@clydin @alan-agius4 Same issue with cli 8.1.1
OP sent a repro of the issue, were you able to reproduce it on your end ?
Found 43 dependencies.
We analyzed your package.json, there are some packages to update:
Name Version Command to update
--------------------------------------------------------------------------------
@angular/cli 8.0.6 -> 8.1.1 ng update @angular/cli
@angular/core 8.1.0 -> 8.1.1 ng update @angular/core
@ngrx/store 8.0.1 -> 8.1.0 ng update @ngrx/store
馃 ~/src/squid-web-app (upgrades)
$ ng update @angular/cli
Your global Angular CLI version (8.1.0) is greater than your local
version (8.0.6). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Using package manager: 'npm'
Collecting installed dependencies...
Found 43 dependencies.
Fetching dependency metadata from registry...
Package "@angular/cdk" has an incompatible peer dependency to "@angular/common" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.1").
Package "@angular/material" has an incompatible peer dependency to "@angular/animations" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.1").
Package "@angular/material" has an incompatible peer dependency to "@angular/forms" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.1").
Package "@angular/cdk" has an incompatible peer dependency to "@angular/core" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.1").
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.
@hugodes just one clarification, on 8.1.1
the message now shows that 8.2.0-next.1
would be installed instead of -next.0
Whatever the issue is, it's being dragged along with new versions.
Same issue here, please fix
Using package manager: 'npm'
Collecting installed dependencies...
Found 42 dependencies.
Fetching dependency metadata from registry...
Package "codelyzer" has an incompatible peer dependency to "@angular/core" (requires ">=2.3.1 <9.0.0 || >8.0.0-beta <9.0.0" (extended), would install "8.2.0-next.1").
Package "@angular/material" has an incompatible peer dependency to "@angular/animations" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.1").
Package "@angular/material" has an incompatible peer dependency to "@angular/common" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.1").
Package "@angular/material" has an incompatible peer dependency to "@angular/forms" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-next.1").
Package "ng-packagr" has an incompatible peer dependency to "@angular/compiler-cli" (requires "^6.0.0 || ^7.0.0 || ^8.0.0-beta.0 || ^8.1.0-beta.0" (extended), would install "8.2.0-next.1").
Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.3.1 <9.0.0 || >8.0.0-beta <9.0.0" (extended), would install "8.2.0-next.1").
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.
Same issue
with 8.1.2 version have the same issue.
For me the error appeared using @angular/cli installed globally. Installing locally solved my problem
npm install @angular/[email protected]
npx ng update @angular/cdk
Workaround is just installing the cli directly through npm
This combination doesn't make sense.
npm install does a local installation of @angular/cli.
npx ng creates a temporary, global "installation" of @angular/cli, executes the command and removes the temporary files again.
@db6edr That's just how I'm using the angular-cli, without a global installation. You might as well use it without npx but the issue was updating the @angular/cli package through the cli itself and that's what the first command is for. I've had no issue installing other @angular packages, thus the follow-up command to install other packages via the cli.
Running ng update @angular/cli @angular/cdk @angular/core @angular/material
worked for us..
Package "@angular/material" has an incompatible peer dependency to "@angular/common" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-rc.0").
Package "@angular/material" has an incompatible peer dependency to "@angular/animations" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-rc.0").
Package "@angular/material" has an incompatible peer dependency to "@angular/forms" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-rc.0").
Package "@angular/material" has an incompatible peer dependency to "@angular/core" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-rc.0").
Incompatible peer dependencies found. See above.
Facing the above issue when trying to update cli using ng update @angular/cli
. All of the other dependencies updated properly using ng update
list, except @angular/cli.
ng update
Found 56 dependencies.
We analyzed your package.json, there are some packages to update:
Name Version Command to update
---------------------------------------------------------------------------------------
@angular/cli 8.1.2 -> 8.1.3 ng update @angular/cli
ng update @angular/cli
Package "@angular/flex-layout" has an incompatible peer dependency to "@angular/common" (requires ">=8.0.0-rc.5", would install "8.2.0-rc.0").
Package "@angular/flex-layout" has an incompatible peer dependency to "@angular/core" (requires ">=8.0.0-rc.5", would install "8.2.0-rc.0").
Package "@angular/material" has an incompatible peer dependency to "@angular/animations" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-rc.0").
Package "@angular/flex-layout" has an incompatible peer dependency to "@angular/platform-browser" (requires ">=8.0.0-rc.5", would install "8.2.0-rc.0").
Package "@nguniversal/module-map-ngfactory-loader" has an incompatible peer dependency to "@angular/platform-server" (requires "^8.0.0" (extended), would install "8.2.0-rc.0").
Package "@angular/material" has an incompatible peer dependency to "@angular/forms" (requires "^8.0.0 || ^9.0.0-0" (extended), would install "8.2.0-rc.0").
Package "@swimlane/ngx-charts" has an incompatible peer dependency to "@angular/platform-browser-dynamic" (requires "7.x || 8.x" (extended), would install "8.2.0-rc.0").
Using the --force
flag worked for me.
Using the --force
flag now will install Angular 9.0.0.next 馃槺
It seems
ng update @angular/cli
- will update package.json to 9.0.0.next
ng update @angular/cli @angular/core
- will update package.json to 8.2.0
PS: with @angular/[email protected] globally installed
With @angular/[email protected]
installed globally
A local ng update @angular/cli
installs [email protected] but also installs @angular/core, etc. to "9.0.0-next.0" _without_ doing ng update @angular/core
Using package manager: 'npm'
Collecting installed dependencies...
Found 44 dependencies.
Fetching dependency metadata from registry...
Updating package.json with dependency @angular/cli @ "8.2.0" (was "8.1.1")...
Updating package.json with dependency @angular/compiler-cli @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/language-service @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/animations @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular-devkit/build-angular @ "0.802.0" (was "0.801.1")...
Updating package.json with dependency @angular/common @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/core @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/compiler @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/forms @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/platform-browser @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/platform-browser-dynamic @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/router @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency typescript @ "3.5.3" (was "3.4.5")...
UPDATE package.json (1795 bytes)
I have the same issue but with the new 8.2.0 release it now installs 9.0.0-next.0
Updating package.json with dependency @angular/animations @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/compiler @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/common @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/forms @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/core @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/platform-browser-dynamic @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/router @ "9.0.0-next.0" (was "8.1.3")...
Here's the log. (in order)
PS > ng update
Your global Angular CLI version (8.1.3) is greater than your local
version (8.1.2). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Using package manager: 'npm'
Found 63 dependencies.
We analyzed your package.json, there are some packages to update:
Name Version Command to update
---------------------------------------------------------------------------------
@angular/cdk 8.1.1 -> 8.1.2 ng update @angular/cdk
@angular/cli 8.1.2 -> 8.2.0 ng update @angular/cli
@angular/core 8.1.3 -> 8.2.0 ng update @angular/core
Updating the global CLI
PS > npm -g install @angular/[email protected]
omitted\AppData\Roaming\npm\ng -> omitted\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
> @angular/[email protected] postinstall omitted\AppData\Roaming\npm\node_modules\@angular\cli
> node ./bin/postinstall/script.js
+ @angular/[email protected]
added 1 package from 1 contributor and updated 16 packages in 15.545s
Updating angular
PS > ng update @angular/cli --force
Your global Angular CLI version (8.2.0) is greater than your local
version (8.1.2). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Using package manager: 'npm'
Collecting installed dependencies...
Found 63 dependencies.
Fetching dependency metadata from registry...
Package "@angular/flex-layout" has an incompatible peer dependency to "@angular/platform-browser" (requires ">=8.0.0-rc.5", would install "9.0.0-next.0").
Package "@angular/flex-layout" has an incompatible peer dependency to "@angular/common" (requires ">=8.0.0-rc.5", would install "9.0.0-next.0").
Package "jest-preset-angular" has an incompatible peer dependency to "@angular/core" (requires ">=2.0.0", would install "9.0.0-next.0").
Package "jest-preset-angular" has an incompatible peer dependency to "@angular/platform-browser-dynamic" (requires ">=2.0.0", would install "9.0.0-next.0").
Updating package.json with dependency @angular/cli @ "8.2.0" (was "8.1.2")...
Updating package.json with dependency @angular/compiler-cli @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/language-service @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/platform-browser @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular-devkit/build-angular @ "0.802.0" (was "0.801.2")...
Updating package.json with dependency @angular/animations @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/compiler @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/common @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/forms @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/core @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/platform-browser-dynamic @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency @angular/router @ "9.0.0-next.0" (was "8.1.3")...
Updating package.json with dependency typescript @ "3.5.3" (was "3.4.5")...
UPDATE package.json (2989 bytes)
npm WARN @angular/[email protected] requires a peer of @angular/core@>=8.0.0-rc.5 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/common@>=8.0.0-rc.5 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/platform-browser@>=8.0.0-rc.5 but none is installed. You must install peer dependencies yourself.
npm WARN @azure/[email protected] requires a peer of @angular/common@^4.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN @azure/[email protected] requires a peer of @angular/core@^4.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN @azure/[email protected] requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/compiler@>=2.3.1 <9.0.0 || >8.0.0-beta <9.0.0 || >8.1.0-beta <9.0.0 || >8.2.0-beta <9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@>=2.3.1 <9.0.0 || >8.0.0-beta <9.0.0 || >8.1.0-beta <9.0.0 || >8.2.0-beta <9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@>=2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/platform-browser-dynamic@>=2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/compiler@>=5.x <=8.x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@>=5.x <=8.x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/forms@>=5.x <=8.x but none is installed. You must install peer dependencies yourself.
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 18 packages from 9 contributors, removed 1 package, updated 46 packages and audited 913394 packages in 49.043s
found 0 vulnerabilities
ng update @angular/core works as expected
I have the same issue. I managed to update @angular/cli and @angular/core by updating them together, but I can't update @angular/cdk as I get the "would install "9.0.0-next.0" error.
Issue had fix when i use the following command with
--force
flag..ng update @angular/cli @angular/core --force
ng update with --force option will update angular irrespective of version conflicts dependencies
ng update @angular/cli @angular/core
worked for me.
I was getting the following error before.
ng update @angular/cli @angular/core @angular/material @angular/cdk @angular/pwa @angular-devkit/build-angular
Using package manager: 'npm'
Collecting installed dependencies...
Found 50 dependencies.
Fetching dependency metadata from registry...
Package "@angular/common" has an incompatible peer dependency to "@angular/core" (requires "9.0.0-next.0" (extended), would install "8.2.0").
Package "@angular/compiler-cli" has an incompatible peer dependency to "@angular/compiler" (requires "9.0.0-next.0", would install "8.2.0")
Package "@angular/common" has an incompatible peer dependency to "@angular/core" (requires "9.0.0-next.0", would install "8.2.0")
Package "ngx-mask" has an incompatible peer dependency to "@angular/common" (requires ">=6.0.0", would install "9.0.0-next.0").
Package "@angular/forms" has an incompatible peer dependency to "@angular/common" (requires "8.2.0", would install "9.0.0-next.0")
Package "@angular/compiler-cli" has an incompatible peer dependency to "@angular/compiler" (requires "9.0.0-next.0" (extended), would install "8.2.0").
Package "@angular/platform-browser-dynamic" has an incompatible peer dependency to "@angular/common" (requires "8.2.0", would install "9.0.0-next.0")
Package "@angular/platform-browser" has an incompatible peer dependency to "@angular/common" (requires "8.2.0", would install "9.0.0-next.0")
Package "@angular/service-worker" has an incompatible peer dependency to "@angular/common" (requires "8.2.0", would install "9.0.0-next.0")
Package "@angular/router" has an incompatible peer dependency to "@angular/common" (requires "8.2.0", would install "9.0.0-next.0")
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.
Edit: it still happens when I update @angular/material though
Cli team blames material, material team blames cli... angular/components/issues/16596
I'm not using material and still seeing this issue.
I was able to get around these issues via manually updating my package.json to latest angular/angular material versions.
Then running:
ng update @angular/cli @angular/core --from 7 --to 8 --migrate-only
ng update @angular/material --from 7 --to 8 --migrate-only
Similar problem here - updating from 8.1.1 -> 8.2.0.
A combined ng update @angular/cli @angular/core
updates both to 8.2.0
.
But when running ng update @angular/material
afterwards, all angular dependencies (except for material, cdk and cli) are updated to 9.0.0-next.0
Similar problem here - updating from 8.1.1 -> 8.2.0.
A combined
ng update @angular/cli @angular/core
updates both to8.2.0
.But when running
ng update @angular/material
afterwards, all angular dependencies (except for material, cdk and cli) are updated to9.0.0-next.0
I have the exact same issue!
Bottom line, ng update doesn't work.
It get the following errors when attempting to upgrade from Angular 7.
Package "@angular/compiler-cli" has an incompatible peer dependency to "@angular/compiler" (requires "9.0.0-next.0", would install "8.2.0")
Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0" (extended), would install "8.2.0"). Package "codelyzer" has an incompatible peer dependency to "@angular/core" (requires ">=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0" (extended), would install "8.2.0").
ng update
definitely has some problems... material as well. On my end, that's when I try to upgrade @angular/material
, it tries to install 9.0.0-next.0
for several packages.
I'm upgrading from 7.1.2. Everything went perfectly until I tried to upgrade @angular/material
and @angular/cdk
. This is a real _PITA_...
Similar problem here - updating from 8.1.1 -> 8.2.0.
A combinedng update @angular/cli @angular/core
updates both to8.2.0
.
But when runningng update @angular/material
afterwards, all angular dependencies (except for material, cdk and cli) are updated to9.0.0-next.0
I have the exact same issue!
These steps helped me resolved the problem:
~9.0.0-next.0"
in package.json. Example: "@angular/common": "~9.0.0-next.0"
to "@angular/common": "^8.1.2",
npm install
Similar problem here - updating from 8.1.1 -> 8.2.0.
A combinedng update @angular/cli @angular/core
updates both to8.2.0
.
But when runningng update @angular/material
afterwards, all angular dependencies (except for material, cdk and cli) are updated to9.0.0-next.0
I have the exact same issue!
These steps helped me resolved the problem:
- Manually edit the version numbers of the depencies which changed to
~9.0.0-next.0"
in package.json. Example:"@angular/common": "~9.0.0-next.0"
to"@angular/common": "^8.1.2",
- Remove node_modules folder
- Run
npm install
I've gone kinda the same way to resolve the issue. I manually upgrade material
and cdk
manually with npm
and then ran the migration command manually from the schematics of angular CLI. Works perfectly the first time.
I don't even have Angular Material in my project.
Just Angular and Bootstrap, that's all and it doesn't work.
In a project with "@angular/core": "~8.1.2",
I ran ng update @angular/cli
and I got "@angular/cli": "~8.2.0"
along with "@angular/core": "~9.0.0-next.0"
. This seems unexpected to me if I don鈥檛 specify --next
.
I was expecting to go to "@angular/core": "~8.2.0"
.
It seems quite surprising to go from a stable to a preview release.
You can use this repo and commit to reproduce/debug: https://github.com/angular-hispano/angular-hispano/commit/7375b34f6e3f2b1158f7430230d2087e1b18d3a6.
I was able to get around these issues via manually updating my package.json to latest angular/angular material versions.
Then running:
ng update @angular/cli @angular/core --from 7 --to 8 --migrate-only
ng update @angular/material --from 7 --to 8 --migrate-only
Run that without the --migrate-only.
Finally installed 8.2.1 and NOT 9.0.0.next... (or whatever)
Also uninstall all other packages that throw that incompatible peer-dependency Error and reinstall them afterwards. In my case it was angularx-social-login.
I am having the same issue
running this command
ng update @angular/cdk @angular/material @angular/material-moment-adapter
and getting this error -
Package "ag-grid-angular" has an incompatible peer dependency to "@angular/core" (requires ">=2.1.x" (extended),
would install "9.0.0-next.2").
Package "ag-grid-angular" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.1.x" (extended), would install "9.0.0-next.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.
Do not want to use force option but why i am getting this error.
@ErVishalM: you are getting this error, because somehow angular cli thinks, that 9.0.0-next.2
is the latest version. You can combine your update command with cli and core (as @heapifyman suggested):
ng update @angular/core @angular/cli @angular/cdk @angular/material @angular/material-moment-adapter
.
Than somehow the correct version is used for peer dependency check (8.2.x
).
It is now having the same problem with the 9.0.0-next.2!
Running ng update
:
Name Version Command to update
--------------------------------------------------------------------------------
@angular/cdk 8.0.2 -> 8.1.2 ng update @angular/cdk
@angular/material 8.0.2 -> 8.1.2 ng update @angular/material
Running ng update @angular/material
Updating package.json with dependency @angular/material @ "8.1.2" (was "8.0.2")...
Updating package.json with dependency @angular/language-service @ "9.0.0-next.2" (was "8.2.2")...
Updating package.json with dependency @angular/compiler-cli @ "9.0.0-next.2" (was "8.2.2")...
Updating package.json with dependency @angular/cdk @ "8.1.2" (was "8.0.2")...
Updating package.json with dependency @angular/core @ "9.0.0-next.2" (was "8.2.2")...
Updating package.json with dependency @angular/animations @ "9.0.0-next.2" (was "8.2.2")...
Updating package.json with dependency @angular/common @ "9.0.0-next.2" (was "8.2.2")...
Updating package.json with dependency @angular/forms @ "9.0.0-next.2" (was "8.2.2")...
Updating package.json with dependency @angular/platform-browser @ "9.0.0-next.2" (was "8.2.2")...
Updating package.json with dependency @angular/router @ "9.0.0-next.2" (was "8.2.2")...
Updating package.json with dependency @angular/compiler @ "9.0.0-next.2" (was "8.2.2")...
Updating package.json with dependency @angular/platform-browser-dynamic @ "9.0.0-next.2" (was "8.2.2")...
@hpawe01 well not solved from this command also. see
run this command -
ng update @angular/core @angular/cli @angular/cdk @angular/material @angular/material-moment-adapter
Using package manager: 'npm'
Collecting installed dependencies...
Found 43 dependencies.
Fetching dependency metadata from registry...
Package '@angular/core' is already up to date.
Package '@angular/cli' is already up to date.
Package "ag-grid-angular" has an incompatible peer dependency to "@angular/core" (requires ">=2.1.x" (extended),
would install "9.0.0-next.2").
Package "ag-grid-angular" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.1.x" (extended), would install "9.0.0-next.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.
I had the exact same issue, but resolved now .
following command worked.
ng update @angular/[email protected] @angular/[email protected] @angular/[email protected]
I hate ng update...
I have the same issue when update @angular/cli 8.1.3 -> 8.2.2
Finally I update in following way:
ng update @angular/core
npm i @angular/[email protected]
, also with cdk & materialnpm i @angular-devkit/[email protected]
@nzbin I'm pretty sure this would skip any automatic code migration that would be done by the ng update
command. I highly recommend you not to do this, unless someone who knows more about it than me can clear things up.
I can confirm @nzbin case, same here from @angular/cli 8.1.3 -> 8.2.2
In my case it want to install @angular/common 9.0.0-next.2
, also when only updating @angular/core
This worked for me: ng update @angular/[email protected] @angular/[email protected]
@JohnnyDevNull I am getting the same error - ng update @angular/[email protected] @angular/[email protected]
Collecting installed dependencies...
Found 43 dependencies.
Package '@angular/core' is already at '8.2.2'.
Fetching dependency metadata from registry...
Package "ag-grid-angular" has an incompatible peer dependency to "@angular/core" (requires ">=2.1.x" (extended),
would install "9.0.0-next.2").
Package "ag-grid-angular" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.1.x" (extended), would install "9.0.0-next.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
Please help us to resolve this issue on priority as we are unable to update angular cli and material
Same issue from 7.2.14 to 8.2.2
this worked for me -
ng update @angular/[email protected] @angular/[email protected] @angular/[email protected]
Still does not work. How are we supposed to update?
Setting the versions by hand does not work either:
ng update @angular/[email protected] @angular/[email protected] @angular/[email protected] @angular/[email protected]
Using package manager: 'npm'
Collecting installed dependencies...
Found 51 dependencies.
Fetching dependency metadata from registry...
Package "@angular/common" has an incompatible peer dependency to "@angular/core" (requires "9.0.0-next.2" (extended), would install "8.2.2").
Package "@angular/platform-browser-dynamic" has an incompatible peer dependency to "@angular/common" (requires "8.2.2", would install "9.0.0-next.2")
Package "@angular/platform-browser" has an incompatible peer dependency to "@angular/common" (requires "8.2.2", would install "9.0.0-next.2")
Package "@angular/common" has an incompatible peer dependency to "@angular/core" (requires "9.0.0-next.2", would install "8.2.2")
Package "@angular/flex-layout" has an incompatible peer dependency to "@angular/common" (requires ">=8.0.0-rc.5", would install "9.0.0-next.2").
Package "@angular/router" has an incompatible peer dependency to "@angular/common" (requires "8.2.2", would install "9.0.0-next.2")
Package "@angular/forms" has an incompatible peer dependency to "@angular/common" (requires "8.2.2", would install "9.0.0-next.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.
Guys, this is a showstopper. If this was a commercial release it would be withdrawn until this issue was resolved. As things stand, following the update instructions results in unreleased beta software being installed. You have to resolve this or pull the update instructions.
@colmben A showstopper? Please! This is an inconvenience, at worst. The issue was reported over a month ago, and it hasn鈥檛 kept me from getting the proper version of Angular installed in my applications. Don鈥檛 be so dramatic.
@rdrrichards Ah great, can you expand on how you safely update all angular packages?
In good faith, I'm stuck with this ng update
fail. I am not familiar enough with the inner workings of angular-cli
to feel safe with just bypassing that through npm
or packages.json
and pray for dependencies to fall in order afterwards.
Nothing magical, really. After seeing this issue come up, all I do is edit the packages.json file, and change all occurrences of 9.0.0-next.2
to 8.2.2
, then run npm install
.
If you're not comfortable with editing the packages.json, try to get some level of comfortable with it. Obviously, relying on the tools 100% of the time can be disappointing.
If this issue were a real show showstopper, the Angular CLI team would have had it fixed by now. Working around this is quite easy.
I don't know how you get to the point where you have 9.0.0-next.2
in packages.json
, it doesn't happen to me :( (see error above)
Bypassing https://github.com/angular/angular-cli/blob/master/packages/angular/cli/commands/update-impl.ts and the rest doesn't seem trivial to me - at least I cannot safely envision the consequences.
IMO, relying on a toolchain is not a weakness but rather the basis for successful devops: having those shortcuts and not caring about the gory details is part of why I chose Angular in the first place :)
I hope a safe workaround can be found until it's fully fixed in a future release.
Same thing just happened to me. Updated from 8.0.0 to what I thought would be 8.2.2, updated all the way to ~9.0.0-next.2. Bit of a surprise...
Nothing magical, really. After seeing this issue come up, all I do is edit the _packages.json_ file, and change all occurrences of
9.0.0-next.2
to8.2.2
, then runnpm install
.If you're not comfortable with editing the _packages.json_, try to get some level of comfortable with it. Obviously, relying on the tools 100% of the time can be disappointing.
If this issue were a _real_ show showstopper, the Angular CLI team would have had it fixed by now. Working around this is quite easy.
Doing that you're asking for trouble. Let me explain it a little here. When you ran ng update @angular/core
and end up with the 9.0.0-next.Y
versions, the CLI also ran the migration for Angular 9 on your project unless you added the flag to skip these which doesn't seem to be the case here. It's working because you got lucky. The migration didn't transition some code to something that is new in Angular 9 and not supported by 8. Otherwise, it wouldn't have worked. This is a reckless way of going around the problem that can results in much bigger problem IMO...
Nothing magical, really. After seeing this issue come up, all I do is edit the _packages.json_ file, and change all occurrences of
9.0.0-next.2
to8.2.2
, then runnpm install
.
If you're not comfortable with editing the _packages.json_, try to get some level of comfortable with it. Obviously, relying on the tools 100% of the time can be disappointing.
If this issue were a _real_ show showstopper, the Angular CLI team would have had it fixed by now. Working around this is quite easy.Doing that you're asking for trouble. Let me explain it a little here. When you ran
ng update @angular/core
and end up with the9.0.0-next.Y
versions, the CLI also ran the migration for Angular 9 on your project unless you added the flag to skip these which doesn't seem to be the case here. It's working because you got lucky. The migration didn't transition some code to something that is new in Angular 9 and not supported by 8. Otherwise, it wouldn't have worked. This is a reckless way of going around the problem that can results in much bigger problem IMO...
This is exactly what happened to me, it updated 30+ source files beyond the 3 that actually needed updating for 8. All quite scary and time consuming for what should be a simple enough framework update. I did exactly what rdrrichards suggests and so now I have an app that is using 8 but migrated to 9. It seems to be working, but I haven't diff'ed all 30+ files yet to understand what the implications are. For a commercial developer this is all time wasted that could have been spent writing code - the exact point of using a framework like Angular in the first place. Obviously we all have different definitions of what is a showstopper, but releasing an update procedure that causes unreleased beta code to be loaded onto your client severs and all your client's code go through an unreleased migration process seems to me to fall within that category.
Hey folks, we're aware of this problem and @clydin is looking into it. Since the discussion is getting a bit heated, I'll lock the issue temporarily until we have some progress. Excuse us for the inconvenience and thank you for your patience!
Side note: if you're already on version 8.x, updating your package.json
to the latest Angular version should be fine. We haven't shipped any changes that require automatic migration (codemods).
This should be resolved now in latest 8.3.x builds.
Most helpful comment
Same error.