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

typeorm Not Compatible with Latest Version of Mongo #10880

Open
1 of 18 tasks
marc-wilson opened this issue May 6, 2024 · 1 comment
Open
1 of 18 tasks

typeorm Not Compatible with Latest Version of Mongo #10880

marc-wilson opened this issue May 6, 2024 · 1 comment

Comments

@marc-wilson
Copy link

Issue description

Mongo dependency bug

Expected Behavior

I would be able to use the latest supported version of the the mongo npm package.

Actual Behavior

You can only have mongodb 5.8 installed.

Steps to reproduce

  • Install latest version of mongodb npm package (v6.6.0)
  • Install typeorm
  • Observe npm error for dependency error

My Environment

Dependency Version
Operating System
Node.js version x.y.zzz
Typescript version x.y.zzz
TypeORM version x.y.zzz

Additional Context

I have a project where I am experimenting with typeorm. I am using it in a monorepo and right now it's scoped to SQL only. I am trying to update mongodb to the latest version (6.6.0) but I am receiving an error because typeorm wants it to be 5.8.

Looking at the package.json, it looks like mongodb 6.3.0 is registered as a dev dependency and mongo 5.8 is a peer dependency. I'm assuming the peer dependency of 5.8 in typeorm is what is preventing me from updating my unrelated project to the lastest package.

npm ERR! While resolving: typeorm@0.3.20
npm ERR! Found: mongodb@6.6.0
npm ERR! node_modules/mongodb
npm ERR! mongodb@"^6.6.0" from the root project
npm ERR!
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.2" 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.2" from the root project

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.

@Rochet2
Copy link

Rochet2 commented May 8, 2024

Looks like there is a related PR here:
#10746

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

2 participants