Error: @prisma/client did not initialize yet. Please run "prisma generate"
I have several Nextjs v12 projects using Prisma with a remote Postgresql db. Today when trying to deploy I came across this error message for no known reason.
I deploy to a Caprover server using a Dockerfile.
These projects build fine locally, with no issues.
So far I've tried regenerating the client and re-installing @prisma/client. I have also tried adding RUN npx prisma generate to my Dockerfile, this results in a new error:
How do I go about finding the root of the issue? Any advice greatly appreciated.
1 Reply
This was solved by changing the Node version in my Dockerfile as suggested in this thread https://github.com/prisma/prisma/issues/14073. Really weird for this issue to seemingly come out of nowhere but it's working 🤷♂️
GitHub
Issues · prisma/prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB - Issues · prisma/prisma