Error upgrading to angular 11 using node 15(works with node 14)

🐞 bug report

Affected Package

The issue is caused by package @angular/….

It appears to be @angular/animations but if you remove that from your package.json then it just complains about another @angular/* package or some other package which depends on one. You keep getting the same ERESOLV errors from npm.

Description

Upgrading a project from angular 10.x to 11.0.5 does not work with node 15. It works if you switch to node 14.15.3(latest LTS).

🔬 Minimal Reproduction

https://stackblitz.com/…

🔥 Exception or Error




 ng update --force @angular/cli @angular/core
Using package manager: 'npm'
Collecting installed dependencies...
Found 91 dependencies.
Fetching dependency metadata from registry...
                  Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" (extended), would install "11.0.5").
                  Package "codelyzer" has an incompatible peer dependency to "@angular/core" (requires ">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" (extended), would install "11.0.5").
    Updating package.json with dependency @angular-devkit/build-angular @ "0.1100.5" (was "0.1002.0")...
    Updating package.json with dependency @angular-devkit/core @ "11.0.5" (was "10.2.0")...
    Updating package.json with dependency @angular-devkit/schematics @ "11.0.5" (was "10.2.0")...
    Updating package.json with dependency @angular/cli @ "11.0.5" (was "10.2.0")...
    Updating package.json with dependency @angular/compiler-cli @ "11.0.5" (was "10.2.3")...
    Updating package.json with dependency @angular/language-service @ "11.0.5" (was "10.2.3")...
    Updating package.json with dependency karma @ "5.1.1" (was "5.0.9")...
    Updating package.json with dependency typescript @ "4.0.5" (was "3.9.5")...
    Updating package.json with dependency @angular/animations @ "11.0.5" (was "10.2.3")...
    Updating package.json with dependency @angular/common @ "11.0.5" (was "10.2.3")...
    Updating package.json with dependency @angular/compiler @ "11.0.5" (was "10.2.3")...
    Updating package.json with dependency @angular/core @ "11.0.5" (was "10.2.3")...
    Updating package.json with dependency @angular/forms @ "11.0.5" (was "10.2.3")...
    Updating package.json with dependency @angular/platform-browser @ "11.0.5" (was "10.2.3")...
    Updating package.json with dependency @angular/platform-browser-dynamic @ "11.0.5" (was "10.2.3")...
    Updating package.json with dependency @angular/router @ "11.0.5" (was "10.2.3")...
    Updating package.json with dependency @angular/service-worker @ "11.0.5" (was "10.2.3")...
  UPDATE package.json (4396 bytes)
⠸ Installing packages (npm)...npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: @angular/animations@10.2.3
npm ERR! node_modules/@angular/animations
npm ERR!   @angular/animations@"11.0.5" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! @angular/animations@"11.0.5" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @angular/core@11.0.5
npm ERR! node_modules/@angular/core
npm ERR!   peer @angular/core@"11.0.5" from @angular/animations@11.0.5
npm ERR!   node_modules/@angular/animations
npm ERR!     @angular/animations@"11.0.5" 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/ed/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ed/.npm/_logs/2020-12-30T19_02_15_248Z-debug.log
✖ Package install failed, see above.

Full debug file: 2020-12-30T19_02_15_248Z-debug.log

🌍 Your Environment

OS: MacOS 11.1.0 intel

1 possible answer(s) on “Error upgrading to angular 11 using node 15(works with node 14)