What it means
Your Prisma schema reads values with env("NAME"). A command needed that value and it was not set in the place the command ran. The message names the variable.
How to fix it
-
If it is
DATABASE_URL. When your app has an Antideploy database, the variable is set for the migration step and for the running app. If your app has none, ask your agent to add a database, or save your ownDATABASE_URLas a variable. -
If it is another variable, such as
DIRECT_URL. Save it as a variable for the app and redeploy. -
If it fails during the image build. Variables you save are available when the app runs and during the migration step, not while the image is being built. Commands that need the database, such as
prisma migrateor a query, belong in the migration step or the running app, not in a build script.prisma generateitself does not need the database.
Steps
-
Find which command raised it
The log shows the command above the message.
-
Set or create what is missing
Create the database or save the variable.
-
Deploy again
A failed deploy never counts against your plan.