mapper
mapper copied to clipboard
Dependency conflict with reflect-metadata when install with NestJS
Is there an existing issue for this?
- [X] 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
- Add "reflect-metadata": "^0.2.0" in your project dependencies.
- 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 - [X]
@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
Same bug here...
Any idea when approval on the PR will come in?
in the meantime you can use npm install --legacy-peer-deps (but I agree it is not clean)
same issue