You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, the previous version in which this bug was not present was upgrading 11 to 12. However, it is also reproducible upgrading from 12.2.7 to 12.2.13. I have also reproduced this upgrading an existing workspace.
Description
The ng update command fails with the below mentioned error while upgrading a newly generated workspace from 12 to 13. No modifications to the repository were made.
🔬 Minimal Reproduction
Generate a new workspace and application with Angular 12.
Run npm install.
Run npx @angular/cli@13 update @angular/core@13 @angular/cli@13.
🔥 Exception or Error
Updating package.json with dependency @angular/router @ "13.1.0" (was "12.2.14")...
UPDATE package.json (1065 bytes)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: test@0.0.0
npm ERR! Found: @angular-devkit/build-angular@12.2.14
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~13.1.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @angular-devkit/build-angular@"~13.1.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/compiler-cli@13.1.0
npm ERR! node_modules/@angular/compiler-cli
npm ERR! peer @angular/compiler-cli@"^13.0.0 || ^13.1.0-next" from @angular-devkit/build-angular@13.1.1
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~13.1.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/trevor/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/trevor/.npm/_logs/2021-12-13T18_17_29_516Z-debug.log
✖ Package install failed, see above.
Issue#22162 is related but is about the node_modules directory. It outlines the following workaround. However, I wouldn't expect a workaround to be required.
Revert package.json.
With node_modules deleted, run npm install.
Delete package-lock.json.
Run npx @angular/cli@13 update @angular/core@13 @angular/cli@13.
The text was updated successfully, but these errors were encountered:
TrevorKarjanis
changed the title
Ng update fails while upgrading from 12 to 13 with a new workspace
Ng update fails while upgrading from 12 to 13
Dec 13, 2021
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was upgrading 11 to 12. However, it is also reproducible upgrading from 12.2.7 to 12.2.13. I have also reproduced this upgrading an existing workspace.
Description
The
ng update
command fails with the below mentioned error while upgrading a newly generated workspace from 12 to 13. No modifications to the repository were made.🔬 Minimal Reproduction
npm install
.npx @angular/cli@13 update @angular/core@13 @angular/cli@13
.🔥 Exception or Error
🌍 Your Environment
Angular CLI: 12.2.14
Node: 16.13.0 (Unsupported)
Package Manager: npm 8.1.0
OS: darwin x64
Angular: 12.2.14
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.1202.14
@angular-devkit/build-angular 12.2.14
@angular-devkit/core 12.2.14
@angular-devkit/schematics 12.2.14
@schematics/angular 12.2.14
rxjs 6.6.7
typescript 4.3.5
Anything else relevant?
Issue#22162 is related but is about the node_modules directory. It outlines the following workaround. However, I wouldn't expect a workaround to be required.
package.json
.node_modules
deleted, runnpm install
.package-lock.json
.npx @angular/cli@13 update @angular/core@13 @angular/cli@13
.The text was updated successfully, but these errors were encountered: