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

Could not resolve dependency for reflect-metadata #13082

Closed
4 of 15 tasks
ghost opened this issue Jan 23, 2024 · 1 comment
Closed
4 of 15 tasks

Could not resolve dependency for reflect-metadata #13082

ghost opened this issue Jan 23, 2024 · 1 comment
Labels
needs triage This issue has not been looked into

Comments

@ghost
Copy link

ghost commented Jan 23, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

npm ERR! Could not resolve dependency:
npm ERR! peer reflect-metadata@"^0.1.12" from @nestjs/common@10.3.0
npm ERR! node_modules/@nestjs/common
npm ERR!   @nestjs/common@"10.3.0" from the root project
npm ERR!   peer @nestjs/common@"^9.0.0 || ^10.0.0" from @nestjs/swagger@7.2.0
npm ERR!   node_modules/@nestjs/swagger
npm ERR!     @nestjs/swagger@"7.2.0" from the root project

Could not properly resolve dependencies for new reflect-metadata.

Minimum reproduction code

https://github.com/mateuszzastawny/nestjs-common-issue

Steps to reproduce

  1. npm install reflect-metadata@0.2.1
  2. npm install @nestjs/common@10.3.0

Expected behavior

Installing dependencies without errors.

Package

  • I don't know. Or some 3rd-party package
  • @nestjs/common
  • @nestjs/core
  • @nestjs/microservices
  • @nestjs/platform-express
  • @nestjs/platform-fastify
  • @nestjs/platform-socket.io
  • @nestjs/platform-ws
  • @nestjs/testing
  • @nestjs/websockets
  • Other (see below)

Other package

@nestjs/swagger

NestJS version

No response

Packages versions

{
  "dependencies": {
    "@nestjs/bull": "10.0.1",
    "@nestjs/cache-manager": "2.2.0",
    "@nestjs/common": "10.3.0",
    "@nestjs/core": "10.3.0",
    "@nestjs/microservices": "10.3.0",
    "@nestjs/mongoose": "10.0.2",
    "@nestjs/platform-express": "10.3.0",
    "@nestjs/swagger": "7.2.0",
    "reflect-metadata": "0.2.1"
  }
}

Node.js version

20.11.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@ghost ghost added the needs triage This issue has not been looked into label Jan 23, 2024
@ghost ghost changed the title Culd not resolve dependency for reflect-metadata Could not resolve dependency for reflect-metadata Jan 23, 2024
@micalevisk
Copy link
Member

as the error says, you should use reflect-metadata 0.1.x, not 0.2.x

not sure when we can start supporting the latest version of reflect-metadata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has not been looked into
Projects
None yet
Development

No branches or pull requests

2 participants