The site works fine in localhost, but get errors during Build.
I already installed and added "postinstall": "prisma generate" to script and installed @netlify/plugin-nextjs .
The site works fine in localhost, but get errors during Build.
I already installed and added "postinstall": "prisma generate" to script and installed @netlify/plugin-nextjs .
Copyright © 2021 Jogjafile Inc.
Looks to me like you are perhaps trying to use the prisma server to create content during the build; however, if the prisma server is something that you are deploying on Netlify, it won't be up and running at any accessible URL until after the build is complete. Bit of a chicken and egg problem if I am understanding it correctly.
If you are querying it at build time (not runtime/browse time, after the end of the deploy), I'd guess you either need to start it explicitly so you can query it (and then end it explicitly when the build is done) or use an external URL which is always available. You can host the prisma "server" on Netlify in a lambda, with a 2-step deploy process: