ng update does not update deps in projects
See original GitHub issue🐞 bug report
Affected Package
This seems to be an issue with @angular/cli.
Is this a regression?
Not sure, first time trying to update a project!
Description
I’ve run through the ng update
(from Angular 8.2 to Angular 9.1) process and the workspace deps were updated, but my project package.json
was not updated with the new versions.
My workspace deps look like this:
"dependencies": {
"@angular/common": "^9.1.12",
"@angular/compiler": "^9.1.12",
"@angular/core": "^9.1.12",
// ... etc.
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.901.10",
"@angular-devkit/build-ng-packagr": "~0.901.10",
// ... etc.
}
while my project deps look like this:
"peerDependencies": {
"@angular/common": "^8.2.13",
"@angular/core": "^8.2.13"
},
"devDependencies": {
"@angular/compiler": "8.2.13",
"@angular/platform-browser": "8.2.13",
"@angular/platform-browser-dynamic": "8.2.13",
// ... etc.
}
🔬 Minimal Reproduction
I couldn’t find a way of creating an Angular 8 project as ng new
seems to just opt for latest. If this is incorrect, please correct me and I’ll try and create a reproduction of this.
🌍 Your Environment
Angular Version: Before upgrade:
Angular CLI: 8.3.17
Node: 12.16.1
OS: darwin x64
Angular: 8.2.13
... common, compiler, compiler-cli, core, language-service
... platform-browser, platform-browser-dynamic
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.803.17
@angular-devkit/build-angular 0.803.17
@angular-devkit/build-ng-packagr 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
ng-packagr 5.7.1
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2
After upgrade:
Angular CLI: 9.1.10
Node: 12.16.1
OS: darwin x64
Angular: 9.1.12
... common, compiler, compiler-cli, core, language-service
... platform-browser, platform-browser-dynamic
Ivy Workspace: Yes
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.901.10
@angular-devkit/build-angular 0.901.10
@angular-devkit/build-ng-packagr 0.901.10
@angular-devkit/build-optimizer 0.901.10
@angular-devkit/build-webpack 0.901.10
@angular-devkit/core 9.1.10
@angular-devkit/schematics 9.1.10
@angular/cli 9.1.10
@ngtools/webpack 9.1.10
@schematics/angular 9.1.10
@schematics/update 0.901.10
ng-packagr 9.1.5
rxjs 6.5.3
typescript 3.8.3
webpack 4.42.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
ng update - Angular
Shows a help message for this command in the console. Only perform a migration, do not update the installed version. The name of...
Read more >Cannot update a project from Angular 13 to 14 - Stack Overflow
I have two suggestions: Suggestion 1: First upgrade the @angular-eslint/schematics package. ng update @angular-eslint/schematics@14.
Read more >Don't be afraid and just `ng update`! | by beeman | ITNEXT
When running ng update, the Angular CLI checks for updates for the Angular dependencies of your app, downloads and installs them and applies...
Read more >Automate Updating Dependencies - Nx
Update to the latest Nx version · The installed dependencies are updated including the package.json (and node_modules ). · The source code in...
Read more >Updating packages downloaded from the registry - npm Docs
Updating local packages · Navigate to the root directory of your project and ensure it contains a package.json file: cd /path/to/project · In...
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
Thanks for your explanation, @alan-agius4 . That really helps!
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.