prisma: v3.7.0 and above immediately crashes Next.js app
Bug description
I’ve been using Prisma and Next.js together for quite a while.
When I upgrade Prisma to 3.7.0 or above, and then run my Next.js app, it immediately crashes the process when I load any page.
The console just gives:
zsh: killed npm run dev
Is there any more useful logging I could get, to help debug this? Has anything changed in 3.7.0 which could cause this? I have tested with 3.8.0 too and it gives the same result. I’m using the latest version of Next.js 12.0.8 Thanks
How to reproduce
Expected behavior
No response
Prisma information
Environment & setup
- OS: Mac OS
- Database: MySQL RDS
- Node.js version: 16.13.0
Prisma Version
3.7.0 and above
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (7 by maintainers)
FWIW I ran into this exact same problem. Running
rm -rf node_modules; npm i
fixed it for me, so likely something strange being cached.I also had this issue (not in Next) right now on macOS. Removing the
./node_modules/.prisma
folder and runningprisma generate
again solved this issue.I hope it helps somebody.
I just updated from Prisma
3.8.1
to3.9.1
on an express application and saw, shortly after initializing the PrismaClient instance, my whole server process get killed via SIGKILL.I reduced the application code more and more until it was basically doing nothing but initializing Prisma - and when commenting out the Prisma code or reverting back to the old version it would work fine.
After finding this thread I tried a
rm -rf node_modules; npm i
and it started working again. Maybe still worth looking into whatever kind of caching the prisma module is doing, especially after updates? Or even recommending a full node_modules wipe on every update in the Release notes? I know this would have saved me some time and headache.I’m using
npm -v
8.1.3 andnode -v
v16.13.0.Ok thanks, I’ll get lots of console logs dropped in and see where we get to.