Intermittent Server Error with Prisma 6.2.1 with Node 22 on Linux Mint
I am building NextJS application with Prisma on Linux Mint and have recently starting getting intermittent errors when running the application on localhost. For example, if I change a file and spark a hot module replacement, SOMETIMES it will give me an error on the console saying : (see attached)
⨯ [Error: [object Object]] { digest: '520418415' } GET / 500 in 2396ms
⨯ [Error: [object Object]] { digest: '520418415' } GET / 500 in 2396ms
And I get an unhandled exception on the browser saying: (see attached)
[ Server ] Error: {clientVersion 6.2.1}
[ Server ] Error: {clientVersion 6.2.1}
` indicating that there is some issue with my Prisma client. (Yes, I have regenerated Prisma several times)
And I get
500 Internal Server Error
500 Internal Server Error
message on the network debug panel (see attached)
This seems to only be an issue on Linux (I am running Mint 22). When I do the same on my Windows 11 laptop, I am not seeing this error. Also, when I build and deploy the application to Vercel, I do not get the issue. This happens ONLY on my locahost after running
pnpm dev
pnpm dev
to run the app for debugging. I cannot tell if this is an issue with Prisma, Node, or Linux.
It only happens intermittently. Sometimes I just refresh the page and it works again and I cannot seem to reproduce the error consistently after several tries.
This is happening on a page where Prisma is executing a simple query to retrieve about 7 records from the database and render them to the page. When I remove this query, I no longer get the error, making me think that the Prisma query is sometimes causing the error.
Any suggestions would be much appreciated. Is there something I'm not seeing?