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

Unresolved npm dependencies with nestjs 10.3.2 #1426

Closed
2 of 4 tasks
mannes-paqt opened this issue Feb 9, 2024 · 4 comments
Closed
2 of 4 tasks

Unresolved npm dependencies with nestjs 10.3.2 #1426

mannes-paqt opened this issue Feb 9, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@mannes-paqt
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I follow instructions to add this library to a nest application i get the following error from npm

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: sequelize-test@0.0.1
npm ERR! Found: reflect-metadata@0.2.1
npm ERR! node_modules/reflect-metadata
npm ERR!   reflect-metadata@"^0.2.0" from the root project
npm ERR!   peer reflect-metadata@"^0.1.12 || ^0.2.0" from @nestjs/common@10.3.2
npm ERR!   node_modules/@nestjs/common
npm ERR!     @nestjs/common@"^10.0.0" from the root project
npm ERR!     peer @nestjs/common@"^8.0.0 || ^9.0.0 || ^10.0.0" from @nestjs/sequelize@10.0.0
npm ERR!     node_modules/@nestjs/sequelize
npm ERR!       @nestjs/sequelize@"*" from the root project
npm ERR!     5 more (@nestjs/core, @nestjs/microservices, ...)
npm ERR!   3 more (@nestjs/core, @nestjs/microservices, @nestjs/websockets)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer reflect-metadata@"^0.1.13" from @nestjs/sequelize@10.0.0
npm ERR! node_modules/@nestjs/sequelize
npm ERR!   @nestjs/sequelize@"*" 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.

Minimum reproduction code

no code created

Steps to reproduce

  1. create new application with nest-cli, nest new sequelize-test
  2. run npm i --save @nestjs/sequelize sequelize-typescript sequelize in new project dir

Expected behavior

Should install sequelize and dependencies without error

Package version

latest (10.0.0?)

NestJS version

10.3.2

Node.js version

v18.16.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@mannes-paqt mannes-paqt added the bug Something isn't working label Feb 9, 2024
@ab14bhardwaj
Copy link

@mannes-paqt Downgrading the "reflect-metadata" version in your package.json file might resolve this issue.

   "reflect-metadata": "^0.1.13",

I am also facing the same issue and it needs to be fixed by the maintainers for this repository as they have fixed the peerDependcies like below. [Refer]

  "peerDependencies": {
    "@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0",
    "@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0",
    "reflect-metadata": "^0.1.13",
    "rxjs": "^7.2.0",
    "sequelize": "^6.3.5",
    "sequelize-typescript": "^2.0.0"
  },

@Tony133
Copy link
Contributor

Tony133 commented Feb 10, 2024

There is a PR that solves this problem here: #1415

@fire015
Copy link

fire015 commented Feb 11, 2024

+1 issue

@kamilmysliwiec
Copy link
Member

Fixed

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

No branches or pull requests

5 participants