Hello,
I have created a Python web app. I used Flask and PostgresSQL with Prisma for my database.
While building the site on Vercel I got this error: [ERROR] RuntimeError: The Client hasn’t been generated yet, you must run prisma generate
before you can use the client.
See Troubleshooting - Prisma Client Python.
I updated the build command in the project setting to “vercel build && prisma generate”, I also added this line to vercel.json: ““buildCommand”: “vercel build && prisma generate””. And I tried a build.sh file. But nothing seems to work.
my full vercel.json:
{
“version”: 2,
“builds”: [
{
“src”: “index.py”,
“use”: “@vercel/python”,
“config”: {
“buildCommand”: “sh vercel_build.sh”
}
}
]
}
This is the build log:
[14:53:52.701] Running build in Washington, D.C., USA (East) – iad1
[14:53:53.497] Cloning github.com/GuusWolters/check-checkout (Branch: main, Commit: 0fb54eb)
[14:53:57.399] Cloning completed: 3.901s
[14:53:58.974] Restored build cache from previous deployment (9ZAinrcpHb2nrUQBVeNxQSECtbv7)
[14:53:59.283] Running “vercel build”
[14:54:00.026] Vercel CLI 37.4.0
[14:54:00.877] WARN! Due to builds
existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: Error List
[14:54:01.318] Installing required dependencies…
[14:54:24.295] Build Completed in /vercel/output [23s]
[14:54:24.948] Deploying outputs…
[14:54:56.309]
[14:54:56.564] Deployment completed
[14:54:57.708] Uploading build cache [29.00 B]…
[14:54:57.789] Build cache uploaded: 80.599ms
Can someone please help me?
– Guus