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 conflict with reflect-metadata when install with NestJS #606

Open
2 of 9 tasks
Skryabind opened this issue Mar 17, 2024 · 6 comments · May be fixed by #615
Open
2 of 9 tasks

Dependency conflict with reflect-metadata when install with NestJS #606

Skryabind opened this issue Mar 17, 2024 · 6 comments · May be fixed by #615
Labels
bug Something isn't working

Comments

@Skryabind
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

I have installed NestJs and have reflect-metadata in my dependencies:
"reflect-metadata": "^0.2.0"

I try to install automapper libs:
npm i --save @automapper/core @automapper/nestjs @automapper/classes reflect-metadata
and get a error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/reflect-metadata
npm ERR!   reflect-metadata@"^0.2.0" from [email protected]
npm ERR!   api
npm ERR!     [email protected]
npm ERR!     node_modules/api
npm ERR!       workspace api from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer reflect-metadata@"~0.1.13" from @automapper/[email protected]
npm ERR! node_modules/@automapper/classes
npm ERR!   @automapper/classes@"*" from [email protected]
npm ERR!   api
npm ERR!     [email protected]
npm ERR!     node_modules/api
npm ERR!       workspace api 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! 

I found that @automapper/classes has fixed version of reflect-metadata 0.1.13 ans it's conflicted with new versions like 0.2.0.
Can automapper/classes be updated to the latest version of reflect-metadata, or maybe there is some other way to fix a problem?

Models/DTOs/VMs

No response

Mapping configuration

No response

Steps to reproduce

  1. Add "reflect-metadata": "^0.2.0" in your project dependencies.
  2. Install automapper libs:
    npm i --save @automapper/core @automapper/nestjs @automapper/classes

Expected behavior

Expect to automapper can be installed with the latest reflect-metadata lib

Screenshots

No response

Minimum reproduction code

No response

Package

  • I don't know.
  • @automapper/core
  • @automapper/classes
  • @automapper/nestjs
  • @automapper/pojos
  • @automapper/mikro
  • @automapper/sequelize
  • Other (see below)

Other package and its version

No response

AutoMapper version

8.0.0

Additional context

Linux
node v16.20.1

@Skryabind Skryabind added the bug Something isn't working label Mar 17, 2024
@TeoConan
Copy link

Same bug here...

@trancong12102 trancong12102 linked a pull request Apr 23, 2024 that will close this issue
@KroniKZA
Copy link

Any idea when approval on the PR will come in?

@irazers
Copy link

irazers commented May 19, 2024

in the meantime you can use npm install --legacy-peer-deps (but I agree it is not clean)

@swang2019
Copy link

same issue

1 similar comment
@e-lag
Copy link

e-lag commented Nov 8, 2024

same issue

@chriso86
Copy link

Weird, there is a PR for this and it looks like the last update on this repo was 10 months ago.
I wouldn't use it in this state as it seems abandoned at the moment.
Does only one person have control over this repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants