Implement official Prisma solution for client generation
Following Prisma's official documentation for deployment caching issues: https://www.prisma.io/docs/orm/more/help-and-troubleshooting/vercel-caching-issue Changes: - Add 'prisma generate' to build script (official Prisma recommendation) - Add postinstall script for automatic client generation - Remove custom stub generator workaround - Keep runtime Prisma client generation in entrypoint.sh for reliability - Add openssl to runtime container (required for Prisma engines) This follows Prisma best practices: explicitly run prisma generate during the build process to ensure Prisma Client is always up-to-date. The entrypoint script regenerates the client at runtime to guarantee engine availability in the production environment.
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "node scripts/generate-prisma-stub.js && next build",
|
||||
"build": "prisma generate && next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"postinstall": "node scripts/generate-prisma-stub.js || prisma generate || echo 'Prisma generate failed, using stub'"
|
||||
"postinstall": "prisma generate || echo 'Prisma generate skipped'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.14.0",
|
||||
|
||||
Reference in New Issue
Block a user