Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
epelc opened this issue Dec 30, 2020 · 4 comments
Closed

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

epelc opened this issue Dec 30, 2020 · 4 comments
Labels
needs: investigation Requires some digging to determine if action is needed ng update DX

Comments

@epelc
Copy link

epelc commented Dec 30, 2020

🐞 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/[email protected]
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/[email protected]
npm ERR! node_modules/@angular/core
npm ERR!   peer @angular/core@"11.0.5" from @angular/[email protected]
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

@petebacondarwin
Copy link
Contributor

Transferring to the CLI repository.

@petebacondarwin petebacondarwin transferred this issue from angular/angular Dec 30, 2020
@ngbot ngbot bot modified the milestone: needsTriage Jan 4, 2021
@alan-agius4 alan-agius4 removed area: @angular/cli comp: schematics/update freq1: low Only reported by a handful of users who observe it rarely severity3: broken labels Jan 4, 2021
@ngbot ngbot bot modified the milestone: needsTriage Jan 4, 2021
@alan-agius4 alan-agius4 added the needs: investigation Requires some digging to determine if action is needed label Jan 4, 2021
@sod
Copy link

sod commented Jan 7, 2021

node 15 ships with npm@7 that handles peerDependencies different - npm@6 just ignores them and prints a warning if missing. npm@7 installs peerDependencies and exits with an error if it can't.

See https://github.com/npm/rfcs/blob/latest/implemented/0025-install-peer-deps.md
In the meantime you can use npm install --legacy-peer-deps

@dgp1130
Copy link
Collaborator

dgp1130 commented Feb 4, 2021

Duplicate of #19957.

@dgp1130 dgp1130 closed this as completed Feb 4, 2021
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: investigation Requires some digging to determine if action is needed ng update DX
Projects
None yet
Development

No branches or pull requests

5 participants