Conflicting peer dependency of react@18.2.0 when installing drizzle-orm@0.31.2 in Next.js 14.2.4
Hi
I'm install
This new project has dependency to React 18.3.1.
Unfortunately, we encounter the following dependency error when install latest
Do you have any idea of what could be the problem? Shall we use
I'm install
drizzle-ormdrizzle-orm in a Next.js project initialized with create-next-app@14.2.4create-next-app@14.2.4.This new project has dependency to React 18.3.1.
Unfortunately, we encounter the following dependency error when install latest
drizzle-ormdrizzle-orm$ npm install drizzle-orm
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: hello@0.1.0
npm ERR! Found: react@18.3.1
npm ERR! node_modules/react
npm ERR! peer react@"^18.2.0" from next@14.2.4
npm ERR! node_modules/next
npm ERR! next@"14.2.4" from the root project
npm ERR! peer react@"^18.3.1" from react-dom@18.3.1
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@"^18.2.0" from next@14.2.4
npm ERR! node_modules/next
npm ERR! next@"14.2.4" from the root project
npm ERR! react-dom@"^18" from the root project
npm ERR! 2 more (styled-jsx, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! drizzle-orm@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@18.2.0
npm ERR! node_modules/react
npm ERR! peer react@"18.2.0" from react-native@0.74.2
npm ERR! node_modules/react-native
npm ERR! peer react-native@">0.73.0" from @op-engineering/op-sqlite@6.0.6
npm ERR! node_modules/@op-engineering/op-sqlite
npm ERR! peerOptional @op-engineering/op-sqlite@">=2" from drizzle-orm@0.31.2
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.$ npm install drizzle-orm
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: hello@0.1.0
npm ERR! Found: react@18.3.1
npm ERR! node_modules/react
npm ERR! peer react@"^18.2.0" from next@14.2.4
npm ERR! node_modules/next
npm ERR! next@"14.2.4" from the root project
npm ERR! peer react@"^18.3.1" from react-dom@18.3.1
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@"^18.2.0" from next@14.2.4
npm ERR! node_modules/next
npm ERR! next@"14.2.4" from the root project
npm ERR! react-dom@"^18" from the root project
npm ERR! 2 more (styled-jsx, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! drizzle-orm@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@18.2.0
npm ERR! node_modules/react
npm ERR! peer react@"18.2.0" from react-native@0.74.2
npm ERR! node_modules/react-native
npm ERR! peer react-native@">0.73.0" from @op-engineering/op-sqlite@6.0.6
npm ERR! node_modules/@op-engineering/op-sqlite
npm ERR! peerOptional @op-engineering/op-sqlite@">=2" from drizzle-orm@0.31.2
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.Do you have any idea of what could be the problem? Shall we use
--force--force to workaround this error?