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

Dependency issue with 13.1.0 #22333

Closed
phristov opened this issue Dec 10, 2021 · 28 comments · Fixed by #22334
Closed

Dependency issue with 13.1.0 #22333

phristov opened this issue Dec 10, 2021 · 28 comments · Fixed by #22334

Comments

@phristov
Copy link

phristov commented Dec 10, 2021

🐞 Bug report

Can you pin-point the command or commands that are effected by this bug?

  • [x ] new

Did this behavior use to work in the previous version?
Yes
Yes, the previous version in which this bug was not present was: 13.0.0

Description

After I run ng new, npm is returning errors.

🔬 Minimal Reproduction

Angular CLI: 13.1.0
Node: 16.13.1
Package Manager: npm 8.1.2
OS: win32 x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1301.0 (cli-only)
@angular-devkit/core         13.1.0 (cli-only)
@angular-devkit/schematics   13.1.0 (cli-only)
@schematics/angular          13.1.0 (cli-only)
npm install -g @angular/cli
ng new t1we

Log

? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS   [ https://sass-lang.com/documentation/syntax#scss                ]
CREATE t1we/angular.json (3195 bytes)
CREATE t1we/package.json (1068 bytes)
CREATE t1we/README.md (1050 bytes)
CREATE t1we/tsconfig.json (863 bytes)
CREATE t1we/.editorconfig (274 bytes)
CREATE t1we/.gitignore (620 bytes)
CREATE t1we/.browserslistrc (600 bytes)
CREATE t1we/karma.conf.js (1421 bytes)
CREATE t1we/tsconfig.app.json (287 bytes)
CREATE t1we/tsconfig.spec.json (333 bytes)
CREATE t1we/.vscode/extensions.json (130 bytes)
CREATE t1we/.vscode/launch.json (474 bytes)
CREATE t1we/.vscode/tasks.json (938 bytes)
CREATE t1we/src/favicon.ico (948 bytes)
CREATE t1we/src/index.html (290 bytes)
CREATE t1we/src/main.ts (372 bytes)
CREATE t1we/src/polyfills.ts (2338 bytes)
CREATE t1we/src/styles.scss (80 bytes)
CREATE t1we/src/test.ts (745 bytes)
CREATE t1we/src/assets/.gitkeep (0 bytes)
CREATE t1we/src/environments/environment.prod.ts (51 bytes)
CREATE t1we/src/environments/environment.ts (658 bytes)
CREATE t1we/src/app/app-routing.module.ts (245 bytes)
CREATE t1we/src/app/app.module.ts (393 bytes)
CREATE t1we/src/app/app.component.html (23364 bytes)
CREATE t1we/src/app/app.component.spec.ts (1067 bytes)
CREATE t1we/src/app/app.component.ts (209 bytes)
CREATE t1we/src/app/app.component.scss (0 bytes)
⠹ Installing packages (npm)...npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: t1we@0.0.0
npm ERR! Found: typescript@4.5.3
npm ERR! node_modules/typescript
npm ERR!   dev typescript@"~4.5.2" from the root project
npm ERR!   peer typescript@">=4.4.3 <4.6" from @angular-devkit/build-angular@13.1.0
npm ERR!   node_modules/@angular-devkit/build-angular
npm ERR!     dev @angular-devkit/build-angular@"~13.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@">=4.4.2 <4.5" from @angular/compiler-cli@13.0.3
npm ERR! node_modules/@angular/compiler-cli
npm ERR!   dev @angular/compiler-cli@"~13.0.0" from the root project
npm ERR!   peer @angular/compiler-cli@"^13.0.0 || ^13.1.0-next" from @angular-devkit/build-angular@13.1.0
npm ERR!   node_modules/@angular-devkit/build-angular
npm ERR!     dev @angular-devkit/build-angular@"~13.1.0" 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 C:\Users\x\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\x\AppData\Local\npm-cache\_logs\2021-12-10T07_17_11_880Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.

Report

# npm resolution error report

2021-12-10T07:17:51.863Z

While resolving: t1weqwe@0.0.0
Found: typescript@4.5.3
node_modules/typescript
  dev typescript@"~4.5.2" from the root project
  peer typescript@">=4.4.3 <4.6" from @angular-devkit/build-angular@13.1.0
  node_modules/@angular-devkit/build-angular
    dev @angular-devkit/build-angular@"~13.1.0" from the root project

Could not resolve dependency:
peer typescript@">=4.4.2 <4.5" from @angular/compiler-cli@13.0.3
node_modules/@angular/compiler-cli
  dev @angular/compiler-cli@"~13.0.0" from the root project
  peer @angular/compiler-cli@"^13.0.0 || ^13.1.0-next" from @angular-devkit/build-angular@13.1.0
  node_modules/@angular-devkit/build-angular
    dev @angular-devkit/build-angular@"~13.1.0" from the root project

Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

Raw JSON explanation object:

{
  "code": "ERESOLVE",
  "current": {
    "name": "typescript",
    "version": "4.5.3",
    "whileInstalling": {
      "name": "t1weqwe",
      "version": "0.0.0",
      "path": "D:\\projects\\t1weqwe"
    },
    "location": "node_modules/typescript",
    "isWorkspace": false,
    "dependents": [
      {
        "type": "dev",
        "name": "typescript",
        "spec": "~4.5.2",
        "from": {
          "location": "D:\\projects\\t1weqwe"
        }
      },
      {
        "type": "peer",
        "name": "typescript",
        "spec": ">=4.4.3 <4.6",
        "from": {
          "name": "@angular-devkit/build-angular",
          "version": "13.1.0",
          "whileInstalling": {
            "name": "t1weqwe",
            "version": "0.0.0",
            "path": "D:\\projects\\t1weqwe"
          },
          "location": "node_modules/@angular-devkit/build-angular",
          "isWorkspace": false,
          "dependents": [
            {
              "type": "dev",
              "name": "@angular-devkit/build-angular",
              "spec": "~13.1.0",
              "from": {
                "location": "D:\\projects\\t1weqwe"
              }
            }
          ]
        }
      }
    ]
  },
  "currentEdge": {
    "type": "dev",
    "name": "typescript",
    "spec": "~4.5.2",
    "from": {
      "location": "D:\\projects\\t1weqwe"
    }
  },
  "edge": {
    "type": "peer",
    "name": "typescript",
    "spec": ">=4.4.2 <4.5",
    "error": "INVALID",
    "from": {
      "name": "@angular/compiler-cli",
      "version": "13.0.3",
      "whileInstalling": {
        "name": "t1weqwe",
        "version": "0.0.0",
        "path": "D:\\projects\\t1weqwe"
      },
      "location": "node_modules/@angular/compiler-cli",
      "isWorkspace": false,
      "dependents": [
        {
          "type": "dev",
          "name": "@angular/compiler-cli",
          "spec": "~13.0.0",
          "from": {
            "location": "D:\\projects\\t1weqwe"
          }
        },
        {
          "type": "peer",
          "name": "@angular/compiler-cli",
          "spec": "^13.0.0 || ^13.1.0-next",
          "from": {
            "name": "@angular-devkit/build-angular",
            "version": "13.1.0",
            "whileInstalling": {
              "name": "t1weqwe",
              "version": "0.0.0",
              "path": "D:\\projects\\t1weqwe"
            },
            "location": "node_modules/@angular-devkit/build-angular",
            "isWorkspace": false,
            "dependents": [
              {
                "type": "dev",
                "name": "@angular-devkit/build-angular",
                "spec": "~13.1.0",
                "from": {
                  "location": "D:\\projects\\t1weqwe"
                }
              }
            ]
          }
        }
      ]
    }
  },
  "strictPeerDeps": false,
  "force": false
}
@cexbrayat
Copy link
Member

This should be fixed by #22334

@alan-agius4
Copy link
Collaborator

Closed via #22334

@nicosoutn2014
Copy link

Hi! Once you fix it, what do I need to do before trying again?

@abngal
Copy link

abngal commented Dec 10, 2021

For quick fix, using node v14.18.2 instead works for me ( replaced node 16.x.x ).

@nicosoutn2014
Copy link

@abngal It keeps throwing me the error for typescript version, should I downgrade it to 4.4.3?

@cexbrayat
Copy link
Member

You should update the Angular packages to v13.1.0 (which supports TS 4.5). This is what the PR fixed, and it will be released in the next CLI version.

@bryantlikes
Copy link

Until that is released, what version of @angular/* works with 13.1.0 of the CLI? Been unable to update to the 13.0.4 versions for the past week because of version issues between the cli and angular and was hoping now that everything was 13.1.0 that it would all work.

@cexbrayat
Copy link
Member

If you use 13.1.0 for all Angular packages (framework and cli), then everything works out of the box. If you want to stay on Angular v13.0.x then the CLI v13.1 works as well, but you'll have to use TS v4.4 instead of TS v4.5.

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Dec 10, 2021

Please update to the most recent version 13.1.1 to resolve the problem.

alan-agius4 added a commit that referenced this issue Dec 11, 2021
This option causes our CI to be green even when new projects are created with mismatching TypeScript versions, which causes failures in a real-world project.

See #22333 for more context.
alan-agius4 added a commit that referenced this issue Dec 11, 2021
This option causes our CI to be green even when new projects are created with mismatching TypeScript versions, which causes failures in a real-world project.

See #22333 for more context.

(cherry picked from commit fb3b1fe)
@AlonsoK28
Copy link

AlonsoK28 commented Dec 14, 2021

My environment

Angular CLI: 13.1.1
Node: 16.13.0
Package Manager: npm 8.1.0
OS: win32 x64

Angular: <error>
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1301.1 (cli-only)
@angular-devkit/build-angular   <error>
@angular-devkit/core            13.1.1 (cli-only)
@angular-devkit/schematics      13.1.1 (cli-only)
@angular/cli                    13.1.1 (cli-only)
@schematics/angular             13.1.1 (cli-only)
rxjs                            6.6.7 (cli-only)
typescript                      <error>

Still same error at update ng12 to ng13 with Angular CLI: 13.1.1

PS D:\Documents\dev\amzmation-app> npx @angular/cli@13 update @angular/core@13 @angular/cli@13
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 13.1.1 to perform the update.
✔ Package successfully installed.
Using package manager: 'npm'
Collecting installed dependencies...
Found 55 dependencies.
Fetching dependency metadata from registry...
    Updating package.json with dependency @angular-devkit/build-angular @ "13.1.1" (was "12.2.14")...
    Updating package.json with dependency @angular/cli @ "13.1.1" (was "12.2.14")...
    Updating package.json with dependency @angular/compiler-cli @ "13.1.0" (was "12.2.14")...
    Updating package.json with dependency @angular/language-service @ "13.1.0" (was "12.2.14")...
    Updating package.json with dependency typescript @ "4.5.4" (was "4.3.5")...
    Updating package.json with dependency @angular/animations @ "13.1.0" (was "12.2.14")...
    Updating package.json with dependency @angular/common @ "13.1.0" (was "12.2.14")...
    Updating package.json with dependency @angular/compiler @ "13.1.0" (was "12.2.14")...
    Updating package.json with dependency @angular/core @ "13.1.0" (was "12.2.14")...
    Updating package.json with dependency @angular/forms @ "13.1.0" (was "12.2.14")...
    Updating package.json with dependency @angular/platform-browser @ "13.1.0" (was "12.2.14")...
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 C:\Users\Alons\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Alons\AppData\Local\npm-cache\_logs\2021-12-14T23_20_58_614Z-debug.log

@dmitriydementor
Copy link

`The installed local Angular CLI version is older than the latest stable version.

Installing a temporary version to perform the update.
✔ Package successfully installed.
Using package manager: 'npm'
Collecting installed dependencies...
Found 52 dependencies.
Fetching dependency metadata from registry...
Updating package.json with dependency @angular-devkit/build-angular @ "13.1.2" (was "12.2.6")...
Updating package.json with dependency @angular/cli @ "13.1.2" (was "12.2.6")...
Updating package.json with dependency @angular/compiler-cli @ "13.1.1" (was "12.2.6")...
Updating package.json with dependency ng-packagr @ "13.1.2" (was "12.2.1")...
Updating package.json with dependency typescript @ "4.5.4" (was "4.3.5")...
Updating package.json with dependency @angular/animations @ "13.1.1" (was "12.2.6")...
Updating package.json with dependency @angular/common @ "13.1.1" (was "12.2.6")...
Updating package.json with dependency @angular/compiler @ "13.1.1" (was "12.2.6")...
Updating package.json with dependency @angular/core @ "13.1.1" (was "12.2.6")...
Updating package.json with dependency @angular/forms @ "13.1.1" (was "12.2.6")...
Updating package.json with dependency @angular/platform-browser @ "13.1.1" (was "12.2.6")...
Updating package.json with dependency @angular/platform-browser-dynamic @ "13.1.1" (was "12.2.6")...
Updating package.json with dependency @angular/router @ "13.1.1" (was "12.2.6")...
UPDATE package.json (3455 bytes)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: project-name@0.0.9-SNAPSHOT
npm ERR! Found: @angular-devkit/build-angular@12.2.6
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"^13.1.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @angular-devkit/build-angular@"^13.1.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/compiler-cli@13.1.1
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.2
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"^13.1.2" 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/dmitriydementor/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user1/.npm/_logs/2021-12-20T13_26_02_337Z-debug.log
✖ Package install failed, see above.`

I have a similar problem when upgrading from 12 to 13 version, here is my ng version info

`Angular CLI: 12.2.5
Node: 14.16.0
Package Manager: npm 7.21.1
OS: darwin x64

Angular:
... animations, cdk, common, compiler, compiler-cli, core, forms
... material, material-moment-adapter, platform-browser
... platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.1202.5 (cli-only)
@angular-devkit/build-angular
@angular-devkit/core 12.2.5 (cli-only)
@angular-devkit/schematics 12.2.5 (cli-only)
@angular/cli 12.2.5 (cli-only)
@schematics/angular 12.2.5 (cli-only)
ng-packagr
rxjs 6.6.7 (cli-only)
typescript `

@blogcraft
Copy link

Lately using ng update for updating Angular and its angular modules are an increasing pain.

Every time there is a new version of angular something always brakes with ERR! code ERESOLVE and with angular's own dependencies.

Just updating @angular/core to 13.1.2 thowed me an error with @angular/animations.

@mrtpain
Copy link

mrtpain commented Jan 14, 2022

This is still broken

@jayhamilton
Copy link

jayhamilton commented Jan 24, 2022

@cexbrayat

Been working on a project for about a month with no issues using v13.1.0 and went to upgrade this morning and with all of the failures, I was struggling. Later this evening I will provide the errors I am seeing. Primarily has to do with animations.

node version => v16.13.1
npm version =>8.1.2
ng update @angular/cli@^13 @angular/core@^13
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 13.1.4 to perform the update.
✔ Package successfully installed.
Using package manager: 'npm'
Collecting installed dependencies...
Found 25 dependencies.
Fetching dependency metadata from registry...
Updating package.json with dependency @angular-devkit/build-angular @ "13.1.4" (was "13.1.1")...
Updating package.json with dependency @angular/cli @ "13.1.4" (was "13.1.1")...
Updating package.json with dependency @angular/compiler-cli @ "13.1.3" (was "13.1.0")...
Updating package.json with dependency @angular/animations @ "13.1.3" (was "13.1.0")...
Updating package.json with dependency @angular/common @ "13.1.3" (was "13.1.0")...
Updating package.json with dependency @angular/compiler @ "13.1.3" (was "13.1.0")...
Updating package.json with dependency @angular/core @ "13.1.3" (was "13.1.0")...
Updating package.json with dependency @angular/forms @ "13.1.3" (was "13.1.0")...
Updating package.json with dependency @angular/platform-browser @ "13.1.3" (was "13.1.0")...
Updating package.json with dependency @angular/platform-browser-dynamic @ "13.1.3" (was "13.1.0")...
Updating package.json with dependency @angular/router @ "13.1.3" (was "13.1.0")...
UPDATE package.json (1136 bytes)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: plm-ui@0.0.0
npm ERR! Found: @angular-devkit/build-angular@13.1.1
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~13.1.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @angular-devkit/build-angular@"~13.1.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/core@13.1.3
npm ERR! node_modules/@angular/core
npm ERR! peer @angular/core@"13.1.3" from @angular/service-worker@13.1.3
npm ERR! node_modules/@angular/service-worker
npm ERR! peerOptional @angular/service-worker@"^13.0.0 || ^13.1.0-next" from @angular-devkit/build-angular@13.1.4
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~13.1.4" 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!

This project was started on 13.1.0. I am trying to do an update as a result of github identifying a medium vulnerability in node-forge. I also tried with force but the issues seemed to have gotten worse. So I completely backed out of the update. Thoughts on being able to do what seems to be a minor update as the Angular team recommends?

@bryantlikes
Copy link

cexbrayat this does not seem to be fixed and I still constantly run into this issue.

Angular CLI: 13.2.3
Node: 16.13.2
Package Manager: npm 8.1.4
OS: win32 x64

Angular: 13.2.2
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1302.3
@angular-devkit/build-angular   13.2.3
@angular-devkit/core            13.2.3
@angular-devkit/schematics      13.2.3
@angular/cli                    13.2.3
@schematics/angular             13.2.3
rxjs                            7.5.2
typescript                      4.5.4

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: cmps-app@4.4.0
npm ERR! Found: @angular-devkit/build-angular@13.1.3
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~13.2.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @angular-devkit/build-angular@"~13.2.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/compiler@13.2.2
npm ERR! node_modules/@angular/compiler
npm ERR! peer @angular/compiler@"13.2.2" from @angular/compiler-cli@13.2.2
npm ERR! node_modules/@angular/compiler-cli
npm ERR! dev @angular/compiler-cli@"~13.2.2" from the root project
npm ERR! peer @angular/compiler-cli@"^13.0.0" from @angular-devkit/build-angular@13.2.3
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! dev @angular-devkit/build-angular@"~13.2.3" from the root project
npm ERR! 2 more (@angular/localize, ng-packagr)
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.

--legacy-peer-deps didn't work and I'd rather not keep having to use --force. Why is this constantly broken?

@jayhamilton
Copy link

jayhamilton commented Feb 16, 2022

@bryantlikes I switched to using yarn using the following tutorial and was able to update without any issues. This is a know issue with npm:
https://codinglatte.com/posts/angular/setup-angular-touse-yarn-package-manager/
This is not an issue with Angular. See the following issue: #22565 (comment)

@bryantlikes
Copy link

I can look into that. I feel like there weren't any issues with this and Angular until the version numbers on the packages got out of sync. .Not sure what the point of that is but I preferred it when the numbers were in sync as it made it easier to make sure everything was the same version. Is there a reason they are different now?

@hanyska
Copy link

hanyska commented Feb 21, 2022

Try ng update @angular/cli @angular/core

@bryantlikes
Copy link

That is what I use

@jayhamilton
Copy link

If you switch to yarn and make it your default package manager, then ng update will work without an issue. https://codinglatte.com/posts/angular/setup-angular-touse-yarn-package-manager/

@manu2504
Copy link

manu2504 commented Feb 27, 2022

Got similar dependency error while upgrading to Angular 13 from 12, solved by using npm v6, and re-running ng update:

npm i -g npm@6

(I was previously on Node v12 and npm v8.)

You may run into following error during the process depending on the state of your repo:

Package '@angular/core' is not a dependency.

Solution: run npm i, commit your change, then re-run your ng update command.

@RogierVC
Copy link

npm i -g npm@6

This worked for me to go from 13.1.x to 13.2.x. Thank you

@bryantlikes
Copy link

Ok, I was also able to upgrade from 13.1.x to 13.2.x after switching to npm@6.

So is this an angular issue or an NPM issue? There has to be a lot of angular developers using npm > 6.

@bryantlikes
Copy link

I guess this line from the packages.json says it all.

  "//engines-comment": "Keep this in sync with /aio/package.json and /aio/tools/examples/shared/package.json",
  "engines": {
    "node": "^12.20.0 || ^14.15.0 || >=16.10.0",
    "yarn": ">=1.22.4 <2",
    "npm": "**Please use yarn instead of NPM to install dependencies"**
  },

@dylanvdmerwe
Copy link

Same issue on my side with npm@8.3.1.

Trying to upgrade from angular 13.1.2 to 13.2.4.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: wunderlust-app@1.0.0
npm ERR! Found: @angular-devkit/build-angular@13.1.3
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR!   dev @angular-devkit/build-angular@"~13.2.5" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! dev @angular-devkit/build-angular@"~13.2.5" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @angular/compiler@13.2.4
npm ERR! node_modules/@angular/compiler
npm ERR!   peer @angular/compiler@"13.2.4" from @angular/compiler-cli@13.2.4
npm ERR!   node_modules/@angular/compiler-cli
npm ERR!     dev @angular/compiler-cli@"~13.2.4" from the root project
npm ERR!     peer @angular/compiler-cli@"^13.0.0" from @angular-devkit/build-angular@13.2.5
npm ERR!     node_modules/@angular-devkit/build-angular
npm ERR!       dev @angular-devkit/build-angular@"~13.2.5" from the root project
npm ERR!     2 more (@angular/localize, ng-packagr)
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.

@bryantlikes
Copy link

@dylanvdmerwe seems the solution is to either install npm@6 or switch to yarn.

@iamdror
Copy link

iamdror commented Mar 11, 2022

same issue here

npm 8.1.2
node v16.13.1

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 13.1.0
Node: 16.13.1
Package Manager: npm 8.1.2
OS: darwin x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1301.0 (cli-only)
@angular-devkit/core         13.1.0 (cli-only)
@angular-devkit/schematics   13.1.0 (cli-only)
@schematics/angular          13.1.0 (cli-only)

CREATE my-workspace/README.md (1057 bytes)
CREATE my-workspace/.editorconfig (274 bytes)
CREATE my-workspace/.gitignore (620 bytes)
CREATE my-workspace/angular.json (139 bytes)
CREATE my-workspace/package.json (1028 bytes)
CREATE my-workspace/tsconfig.json (863 bytes)
CREATE my-workspace/.vscode/extensions.json (130 bytes)
CREATE my-workspace/.vscode/launch.json (474 bytes)
CREATE my-workspace/.vscode/tasks.json (938 bytes)
⠴ Installing packages (npm)...npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-workspace@0.0.0
npm ERR! Found: typescript@4.5.5
npm ERR! node_modules/typescript
npm ERR!   dev typescript@"~4.5.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@">=4.4.2 <4.5" from @angular/compiler-cli@13.0.3
npm ERR! node_modules/@angular/compiler-cli
npm ERR!   dev @angular/compiler-cli@"~13.0.0" 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/drorrash/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/drorrash/.npm/_logs/2022-03-11T09_07_33_595Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.
-----------------------------------------------------------------------------

@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 Apr 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.