Has anyone deployed Prisma recently with NextJS 13?
Unanswered
LaPerm posted this in #help-forum
LaPermOP
I used Vercel for deployment and tried everything modifying build script to include "prisma generate" command, generating prisma in a separate folder and uploading that and postinstall script but still on every single deployment I get Prisma Client Initiation error. And all solutions work fine on my local. If anyone had experienced the same would appreciate if you have any tips on how to resolve this.
4 Replies
@LaPerm I used Vercel for deployment and tried everything modifying build script to include "prisma generate" command, generating prisma in a separate folder and uploading that and postinstall script but still on every single deployment I get Prisma Client Initiation error. And all solutions work fine on my local. If anyone had experienced the same would appreciate if you have any tips on how to resolve this.
show your package.json scripts and vercel build configuration
@joulev show your package.json scripts and vercel build configuration
LaPermOP
{
"name": "push-protocol-react",
"version": "0.1.0",
"private": true,
"dependencies": {
"@auth/prisma-adapter": "^1.0.1",
"@prisma/client": "^5.2.0",
"@pushprotocol/restapi": "^1.2.4",
"@radix-ui/react-dropdown-menu": "^2.0.5",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-slot": "^1.0.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/react": "^18.0.37",
"@web3-react/core": "^6.1.9",
"@web3-react/injected-connector": "^6.0.7",
"axios": "^1.5.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"ethers": "^5.6.9",
"next": "^13.4.16",
"prisma": "^5.1.1",
"next-auth": "^4.23.1",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.7",
"web-vitals": "^2.1.4"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"postinstall": "prisma generate"
},
"devDependencies": {
"@types/gtag.js": "^0.0.12",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.23",
"tailwindcss": "^3.3.2",
"typescript": "5.2.2"
}
}I deployed the same application with Netlify and it worked after I set CI to false, but Vercel version still isn't working
hmm weird...