[BUG]: [email protected] not working with [email protected]
What version of drizzle-orm are you using?
0.30.10
What version of drizzle-kit are you using?
No response
Describe the Bug
react@"18.2.0" is marked as the peer dependency
Expected behavior
the package should be installed with no problem :)
Environment & setup
No response
I'm experiencing the same issue, it happen to me yesterday trying to add drizzle to a fresh nextjs project
I am getting the same error, is drizzle-orm not compatible with [email protected] is there any solution guys
it's look like the latest version of drizzle kit(0.21.4) doesn't work with react 18.3 [email protected] is still working fine for me Just downgrade drizzle kit(0.21.4) to drizzle kit(0.21.2): npm install [email protected]
im also getting this on a fresh nextjs project when installing drizzle-orm tried installing all versions of drizzle-orm down to 0.30.07 and still got the error,
I installed with legacy peer fag npm i drizzle-orm --legacy-peer-deps
Or manually add in package.json then run npm install --legacy-peer-deps
Then I am able to do npm i drizzle-orm with no issue
Worked for me then I can run
is there any statement from drizzle team?
It's discouraging that there has been quite a few problems with Drizzle. I'm not having the same problem, and can't find a good answer yet.
npm install drizzle-orm --legacy-peer-deps adding the --legacy-peer-deps will fix the problem
npm install drizzle-orm --legacy-peer-deps adding the --legacy-peer-deps will fix the problem
This is not a "fix," this is a workaround. The drizzle team needs to update their peer dependencies. Using --legacy-peer-deps is pretty unlikely to break anything but I would probably adjust the versions of react you're using before reaching for this solution. In this case, setting the semver of react and react-dom to ~18.12.0 instead of ^18 should clear up the issue in a safer way until the drizzle team updates their peer deps to the latest version of react.
I have the same problem. When will the developers fix it?
Same problem here, fresh next.js project
In addition to having this issue, I'm wondering why an orm depends on a front-end framework?
In addition to having this issue, I'm wondering why an orm depends on a front-end framework?
i guess is for the drizzle studio? https://orm.drizzle.team/drizzle-studio/overview
In addition to having this issue, I'm wondering why an orm depends on a front-end framework?
i guess is for the drizzle studio? https://orm.drizzle.team/drizzle-studio/overview
Sounds plausible but wouldn't that be published as its own, optional, package?
This problem no longer exits in [email protected]
The issue is still there for the newly created Next.js app.
Sorry for the confusion. I was using bun and yarn and had no problem, apparently the problem persists only when using npm.
@AndriiSherman, any thoughts?
I am absolutely new to drizzle and just prepared a fresh new nextjs project to try it out. Right after my nextjs setup, I tried to install drizzle with mysql2.
PS D:\Typescript\drizzle orm\drizzle_test> npm i drizzle-orm mysql2
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error peer react@"^18.2.0" from [email protected]
npm error node_modules/next
npm error next@"14.2.5" from the root project
npm error peer react@"^18.3.1" from [email protected]
npm error node_modules/react-dom
npm error peer react-dom@"^18.2.0" from [email protected]
npm error node_modules/next
npm error next@"14.2.5" from the root project
npm error react-dom@"^18" from the root project
npm error 2 more (styled-jsx, the root project)
npm error
npm error Could not resolve dependency:
npm error drizzle-orm@"*" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/react
npm error peer react@"18.2.0" from [email protected]
npm error node_modules/react-native
npm error peer react-native@">0.73.0" from @op-engineering/[email protected]
npm error node_modules/@op-engineering/op-sqlite
npm error peerOptional @op-engineering/op-sqlite@">=2" from [email protected]
npm error node_modules/drizzle-orm
npm error drizzle-orm@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
https://github.com/drizzle-team/drizzle-orm/issues/2251#issuecomment-2228400509
👍 - Why is drizzle depending on react?
As Next.js 15 now uses "react": "19.0.0-rc-65a56d0e-20241020", this is now quite a large issue