P
Prisma2y ago
darryl

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.
Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
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:
Error: Get config: Unable to establish a connection to query-engine-node-api library
Error: Get config: Unable to establish a connection to query-engine-node-api library
How do I go about finding the root of the issue? Any advice greatly appreciated.
1 Reply
darryl
darrylOP2y ago
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

Did you find this page helpful?