ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
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
[X] 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.
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
:(I can't use
--force
in certain circumstances)Steps to reproduce
My Environment
Additional Context
No response
Relevant Database Driver(s)
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.