Error: @prisma/client did not initialize yet. Please run "prisma generate"
The generated Prisma Client is missing or out of date.
Seen on:
Node.js
Meaning
Prisma Client is generated from schema.prisma. Fresh installs, CI builds and Docker images need prisma generate (usually via postinstall).
Common causes
- prisma generate not run after install
- Docker build copying node_modules without generation
- Schema changed without regenerating
⚡ Quick fix
- npx prisma generate
- Add "postinstall": "prisma generate"
- Run generate in the Dockerfile after copying the schema
Detailed fix by platform
Docker
- bash
COPY prisma ./prisma RUN npm ci && npx prisma generate
How to diagnose
- Generated — node_modules/.prisma/client exists?
- Build — Is generate part of CI/Docker?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026