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

The new typeorm version is not compatible with the mongodb driver package version 6.x.x #10842

Open
1 of 18 tasks
cannaAriel opened this issue Apr 21, 2024 · 3 comments
Open
1 of 18 tasks

Comments

@cannaAriel
Copy link

Issue description

The last version of typeorm (0.3.20) uses mongodb@6.x.x in its devDependencies, but mongodb@5.x.x in its peerDependencies, which causes a dependency conflict with mongodb@6.x.x

Expected Behavior

The version of typeorm's mongodb should be compatible with mongodb@6.x.x

Actual Behavior

I get the following error when I try to run npm i:

npm ERR! Could not resolve dependency:
npm ERR! peerOptional mongodb@"^5.8.0" from typeorm@0.3.20
npm ERR! node_modules/typeorm
npm ERR!   typeorm@"^0.3.20" from the root project
npm ERR!   peer typeorm@"^0.3.0" from @nestjs/typeorm@10.0.2
npm ERR!   node_modules/@nestjs/typeorm
npm ERR!     @nestjs/typeorm@"^10.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: mongodb@5.9.2
npm ERR! node_modules/mongodb
npm ERR!   peerOptional mongodb@"^5.8.0" from typeorm@0.3.20
npm ERR!   node_modules/typeorm
npm ERR!     typeorm@"^0.3.20" from the root project
npm ERR!     peer typeorm@"^0.3.0" from @nestjs/typeorm@10.0.2
npm ERR!     node_modules/@nestjs/typeorm
npm ERR!       @nestjs/typeorm@"^10.0.1" 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.

(I can't use --force in certain circumstances)

Steps to reproduce

  • Install mongodb@6.x.x
  • Install the currently latest version of the package (typeorm@0.3.20)

My Environment

Dependency Version
Operating System macOS
Node.js version 20.12.2
Typescript version 5.4.3
TypeORM version 0.3.20
MongoDB version 6.5.0
NestJS version 10.0.0
nestjs/typeorm version 10.0.1

Additional Context

No response

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.

@texhnolyzer89
Copy link

Got this problem too.

@noam-moshe
Copy link

Happens to me too.

@avitalBruce
Copy link

I have the same problem too!🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants