Closed Tobbe closed 3 years ago
For this case, we need the prerender command to throw with the correct error code, which will Fail the deployment. @dac09 Maybe you could approach this a couple of ways:
yarn rw deploy ...
command, but this would give people the option to choose according to their use-case
When deploying (at least to Netlify) and prerendering fails during build, that stops Prisma migrations from running. But the build as a whole still says everything is alright, so Netlify goes ahead and publishes the deploy. But without prerendering, and code that's not in sync with the DB (since the migrations haven't run), everything is very broken when trying to use the deployed app.
Here's the build log from Netlify
The parts that stand out the most are:
Nope, not true. Without migrations the app does not work fine 😉 😄
Live, and broken... 🙁 I don't think the build script should report success when prerendering fails and when the migrations haven't run.
I talked to @dac09 about this and his response was:
For comparison, this is what it looks like when it's successful (just the part with the migrations, plus some extra lines for context)