drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
21.44k stars 484 forks source link

[BUG]: The function of installation of neon database is was not working #2523

Open rahulsingh3526 opened 1 week ago

rahulsingh3526 commented 1 week ago

What version of drizzle-orm are you using?

0.31.2

What version of drizzle-kit are you using?

0.22.7

Describe the Bug

not sure which version but it was latest installed. The thing is it was not working with neon database.

Expected behavior

npm i drizzle-orm @neondatabase/serverless npm i -D drizzle-kit

I expected the above commands to work but instead the throwed this error.

npm i drizzle-orm postgres npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: full-stack-todo@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.3 npm ERR! node_modules/next npm ERR! next@"14.2.3" 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.3 npm ERR! node_modules/next npm ERR! next@"14.2.3" 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.0 npm ERR! node_modules/react-native npm ERR! peer react-native@"" from @op-engineering/op-sqlite@5.0.5 npm ERR! node_modules/@op-engineering/op-sqlite npm ERR! peerOptional @op-engineering/op-sqlite@">=2" from drizzle-orm@0.30.9 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 ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:\Users\Aimable\AppData\Local\npm-cache_logs\2024-05-01T06_29_32_052Z-eresolve-report.txt

below is the error which was encountered and solved using the stackoverflow

stackover of the solution to the problem

Environment & setup

This env is in vscode.

oluwaseun-demonflowne commented 1 week ago

I’m having this issue as well , please any solution

rahulsingh3526 commented 1 week ago

I have linked the solution above in stackover flow click on it. check it out. do two npm installation and install drizzle

Shelviton commented 2 days ago

I solved downgrading react and react-dom in package.json to "18.2.0"

happychuks commented 1 day ago

This error is due to the react-native peer dependency issue which i believe is not needed in the project. To solve. install using --force command: npm i --force drizzle-orm @neondatabase/serverless npm i -D drizzle-kit