Skip to content

Angular: Dependency conflict after migrating from Nx 20 to Nx 21 - unable to install npm packages #1189

@BeliliFahem

Description

@BeliliFahem

Describe the bug
Unable to install npm dependencies due to a version conflict between @nx/[email protected] and @nxext/[email protected]. The installation fails with an ERESOLVE error.

To Reproduce
Steps to reproduce the behavior:

  1. Migrate the project from Nx 20 to Nx 21 (following the official documentation or using Nx migration commands).
  2. Run npm install.
  3. Observe the dependency resolution error.

Expected behavior
Npm dependencies should install without errors

Additional context

$ npm i
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: @muqel-workspace/[email protected]
npm error Found: @nx/[email protected]
npm error node_modules/@nx/angular
npm error   dev @nx/angular@"21.5.3" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @nx/angular@"^20.0.0" from @nxext/[email protected]
npm error node_modules/@nxext/ionic-angular
npm error   dev @nxext/ionic-angular@"20.0.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions