Environment Variable Error when using prisma client directly in getStaticProps?

Normally using trpc, but just tried to make a prisma call in getStaticProps directly:
let data = await prisma.item.findUnique({
where: {
id: 'clc378c9p00zaz0194uz6o4u'
}
})
let data = await prisma.item.findUnique({
where: {
id: 'clc378c9p00zaz0194uz6o4u'
}
})
However, this gives me an error (server.mjs) :
Error: Invalid environment variables throw new Error("Invalid environment variables");
Not sure I understand why?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server