Skip to content

Deploy on Vercel: add instructions to explicitly run npx prisma generate on Vercel. #3590

@tanberry

Description

@tanberry

Typically, our deploy operation will trigger npx prisma generate behind the scenes, using a post-install hook. However, Vercel caches dependencies, so the hook doesn't get called on re-deploys.

Solution/workaround is to explicitly run npx prisma generate when deploying to Vercel. @sabinadams or @millsp can you add a bit of detail in a comment below about when exactly in the deployment workflow does the user run this command?

Impacted Docs (there might be others): https://www.prisma.io/docs/guides/deployment/deployment-guides/deploying-to-vercel

There is a Note in this topic that says:
"Note: The build step defined in package.json as the vercel-build script, will run prisma generate && prisma migrate deploy && next build to generate Prisma Client, apply migrations, and build the Next.js project."

This note needs to be edited....

Metadata

Metadata

Assignees

No one assigned

    Labels

    serverless-initiativeSee #orm-discovery-deployment-and-docstype/docsDocumentation creation, updates or corrections

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions