ENV variable not found even if its set
gravgor
HOBBYOP

a year ago

Hey, i got problem with my next.js deployment all the time prisma telling me that env variable isn't here, but i have it.

12 69.38 Error occurred prerendering page "/collections". Read more: https://nextjs.org/docs/messages/prerender-error

#12 69.38 PrismaClientInitializationError:

#12 69.38 Invalid `prisma.user.findMany()` invocation:

#12 69.38

#12 69.38

#12 69.38 error: Environment variable not found: DATABASE_URL.

#12 69.38   -->  schema.prisma:7

#12 69.38    |

#12 69.38  6 |   provider = "postgresql"

#12 69.38  7 |   url      = env("DATABASE_URL")

#12 69.38    |

#12 69.38

#12 69.38 Validation Error Count: 1

8 Replies

gravgor
HOBBYOP

a year ago

db3d7136-a2df-4b6a-89c9-f7316aa5fc50


gravgor
HOBBYOP

a year ago

1309497539221000200


brody
EMPLOYEE

a year ago

are you using a Dockerfile?


gravgor
HOBBYOP

a year ago

yes, i am


gravgor
HOBBYOP

a year ago

because i need to --force npm install for next 15


brody
EMPLOYEE

a year ago

please read these docs -


gravgor
HOBBYOP

a year ago

fixed ty brody <:salute:1137099685417451530>


brody
EMPLOYEE

a year ago

no problem!


Loading...