Skip to content

reflect-metadata peer dependency conflict in NestJS #541

@vahidvdn

Description

@vahidvdn

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I want to try to install dependencies as following:

npm i -D @suites/unit @suites/di.nestjs @suites/doubles.jest

I get the following errors:

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: ticketing-backend-clients-api@0.0.1
npm error Found: reflect-metadata@0.2.2
npm error node_modules/reflect-metadata
npm error   reflect-metadata@"^0.2.0" from the root project
npm error   peer reflect-metadata@"^0.1.12 || ^0.2.0" from @nestjs/common@10.4.15
npm error   node_modules/@nestjs/common
npm error     @nestjs/common@"^10.0.0" from the root project
npm error     peer @nestjs/common@">= 8.0" from @suites/di.nestjs@3.0.0
npm error     node_modules/@suites/di.nestjs
npm error       dev @suites/di.nestjs@"*" from the root project
npm error
npm error Could not resolve dependency:
npm error peer reflect-metadata@"^0.1.13" from @suites/di.nestjs@3.0.0
npm error node_modules/@suites/di.nestjs
npm error   dev @suites/di.nestjs@"*" 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.
npm error

My Nest project is using "reflect-metadata": "^0.2.0"

Minimum reproduction code

https://github.com/suites-dev/suites

Steps to reproduce

Install Nestjs version 10, then install the suites deps

Expected behavior

To get installed

Suites version

No response

Node.js version

22.2.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions