ng update broken for angular v 5.2 (cli v 1.7.4)
See original GitHub issue🐞 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?
Hard to tell. It seems v8 release broke an existing version
Description
when trying to run ng update following theinstructionss on Angular Update Guide I get the follwoing error
Your global Angular CLI version (8.0.0) is greater than your local
version (1.7.4). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Error: Cannot update safely because packages have conflicting dependencies. Package @angular/platform-browser would need to match both versions "7.2.15" and "8.0.0, which are not compatible.
Cannot update safely because packages have conflicting dependencies. Package @angular/platform-browser would need to match both versions "7.2.15" and "8.0.0, which are not compatible.
🔬 Minimal Reproduction
my package.json file
"dependencies": {
"@angular/animations": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"bootstrap": "3.3.7",
"bootstrap-toggle": "^2.2.2",
"bpmn-js": "^3.2.3",
"classlist.js": "^1.1.20150312",
"codemirror": "^5.37.0",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"jexcel": "^1.5.0",
"jquery": "3.3.1",
"jwt-decode": "^2.2.0",
"less": "^3.0.4",
"pgparser": "^1.0.4",
"rxjs": "^5.5.6",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.19"
},
"devDependencies": {
"@angular-devkit/core": "0.3.2",
"@angular/cli": "~1.7.4",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"autoprefixer": "^7.2.3",
"codelyzer": "^4.0.1",
"exports-loader": "^0.7.0",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^3.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.0",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
}
🔥 Exception or Error
Error: Cannot update safely because packages have conflicting dependencies. Package @angular/platform-browser would need to match both versions "7.2.15" and "8.0.0, which are not compatible.
Cannot update safely because packages have conflicting dependencies. Package @angular/platform-browser would need to match both versions "7.2.15" and "8.0.0, which are not compatible.
🌍 Your Environment
Angular CLI: 1.7.4
Node: 11.8.0
OS: darwin x64
Angular: 5.2.11
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.7.4
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.5.3
webpack: 3.11.0
Anything else relevant?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:13
Top Results From Across the Web
My project using angular CLI 1.7.4 what will be the right ...
Go to this https://material.angular.io/ to see which version of Angular Material you should install. The below command will update your ...
Read more >How to install a specific Angular version | by Riccardo Andreatta
In this article you will learn how to install a specific Angular version in your local machine with a simple “hack”
Read more >How To Update Angular CLI To Latest Version
To update Angular CLI to latest version Angular, use ng update @angular/core @angular/cli@latest command.
Read more >Angular versioning and releases
As of Angular version 7, the major versions of Angular core and the CLI are ... You can ng update to any version...
Read more >To disable this warning use "ng config -g cli ... - You.com
Jun 11, 2018 ... ... this warning use "ng config -g cli.warnings.versionMismatch false" ... First update your local angular version using following command....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I got my angular updated the following way: #1 manually install a cli version 7.x.x locally
npm install @angular/cli@7.3.9#2 runng update @angular/cliit now migrates the conf correctly #3 runng update @angular/corethat should get core to v8 #4 runng update @angular/cligoes from cli v7 -> v8@tuuling I tried your solution based on your reply you made to my issue on #14546. The first two steps worked correctly for me. But step 3, updating
@angular/core, fails:I fixed the ng-bootstrap issue by changing the version number in my
package.jsonfile to the most recent version of ng-bootstrap. To resolve the other issues, I usedng update @angular/core --forceinstead of step 3.After doing this, I was able to update @angular/cli using your step 4 you, and the project seems to build correctly. So hopefully everything is converted correctly. I’m curious if you had to use the
--forceoption or if you didn’t encounter the same issues I did.