Skip to content

[BUG]:mysql2 is too new #276

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

Closed
rizen opened this issue Mar 17, 2023 · 3 comments
Closed

[BUG]:mysql2 is too new #276

rizen opened this issue Mar 17, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@rizen
Copy link

rizen commented Mar 17, 2023

What version of drizzle-orm are you using?

0.21.1

Describe the Bug

If you install drizzle-orm and mysql2 at different times, or try to install anything after drizzle-orm you end up with this error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/mysql2
npm ERR!   mysql2@"^3.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional mysql2@">=2 <3" from [email protected]
npm ERR! node_modules/drizzle-orm
npm ERR!   drizzle-orm@"^0.21.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/mysql2
npm ERR!   peerOptional mysql2@">=2 <3" from [email protected]
npm ERR!   node_modules/drizzle-orm
npm ERR!     drizzle-orm@"^0.21.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.

Unless I'm mistaken I think it's because mysql2 is too new. It appears you're looking for version 2 of mysql2 and I have version 3. So either this is a bug, or the install instructions are buggy and we need to request a specific version of mysql2. Or I've completely misunderstood something.

@rizen rizen added the bug Something isn't working label Mar 17, 2023
@dankochetov
Copy link
Contributor

Yep, we've restricted the major version of our peer dependencies to avoid breaking changes on major versions. But we've reconsidered since then, because major version releases don't necessarily mean that the ORM compatibility will break. We'll remove this restriction.

@dankochetov
Copy link
Contributor

Fixed in 0.23.0

@jamesmagoo
Copy link

i'm getting this today - seems to be [email protected]

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@">=18" from @clerk/[email protected]
npm ERR!   node_modules/@clerk/clerk-react
npm ERR!     @clerk/clerk-react@"5.0.1" from @clerk/[email protected]
npm ERR!     node_modules/@clerk/nextjs
npm ERR!       @clerk/nextjs@"^5.0.3" from the root project
npm ERR!   peer react@">=18" from @clerk/[email protected]
npm ERR!   node_modules/@clerk/nextjs
npm ERR!     @clerk/nextjs@"^5.0.3" from the root project
npm ERR!   11 more (@clerk/shared, @radix-ui/react-compose-refs, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! drizzle-orm@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"18.2.0" from [email protected]
npm ERR!   node_modules/react-native
npm ERR!     peer react-native@"*" from @op-engineering/[email protected]
npm ERR!     node_modules/@op-engineering/op-sqlite
npm ERR!       peerOptional @op-engineering/op-sqlite@">=2" from [email protected]
npm ERR!       node_modules/drizzle-orm
npm ERR!         drizzle-orm@"*" 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.

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

3 participants