#Next.js + Vercel + Prisma: Your schema.prisma could not be found + Environment variables not found

5 messages · Page 1 of 1 (latest)

iron lance
#

(Before you read: the @prisma/nextjs-monorepo-workaround-plugin doesn't help)

Hey guys 😊

I described as much as possible the problem in this gist, because of the chars limit in Discord:

https://gist.github.com/0xCaso/87ba726bce1af963a652f7121d3b9e02

Super quick essay:

I have 3 schemas, and I generate 3 different prisma clients in a custom dir (src/generated/client_1/2/3).

I got those errors just on the deployed website, and not locally. The build works in both cases, and the error appears only on the Server side on Vercel when I go to a website page that calls a Prisma function (to interact with one of the dbs).

The weirdest thing is that everything worked till yesterday. Today I pushed a change to a branch (not involving Prisma in any way, and was working locally) and got this error on the Preview mode in Vercel.

Didn't understand yet if it has something to have with the latest release (5.3.0). The thing is that this happens also with the previous version.

Please read the gist as everything should be well described and more clear there. Thanks in advance for your time 😊

Gist

Next.js + Vercel + Prisma: Your schema.prisma could not be found and Environment variables not found at null - gist:87ba726bce1af963a652f7121d3b9e02

fervent sonnet
#

Hello @iron lance 👋

Today I pushed a change to a branch (not involving Prisma in any way, and was working locally) and got this error on the Preview mode in Vercel.
What happens if you revert the change, does your app works as expected?

iron lance
#

also, as I wrote in the gist, if I create a branch from the main (which deployment is working), and do another deploy based on the new branch, it fails in the same way

fervent sonnet
#

That's strange!
Can you try clearing the build cache from vercel and check if it changes anything?