core
core copied to clipboard
Correct config for Prisma with Supabase on Cloudflare
Describe the bug
I'm trying to relocate my Vercel projects to Cloudflare through NuxtHub. I'm using Prisma ORM with Supabase and on Vercel deploy the project works as expected, but in Cloudflare not. I got 500: Cannot read properties of undefined (reading 'exec').
error but in local works!
Steps to reproduce Steps to reproduce the behavior:
- Install
prisma
and@prisma/client
dependencies then addprisma generate
tobuild
command:
{
"name": "esteba-app-appointments",
"private": true,
"type": "module",
"scripts": {
"build": "prisma generate && nuxt build",
},
"dependencies": {
"@prisma/client": "^5.18.0",
"@vueuse/core": "^11.0.1",
"nuxt": "^3.13.0",
"vue": "latest",
},
"devDependencies": {
"prisma": "^5.18.0",
"wrangler": "^3.72.2"
},
"packageManager": "[email protected]"
}
- Create
prisma/schema.prisma
file:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
- set supabase credentials on environment variables project
and thats it, on Vercel this works
Expected behavior Request sent as expected
I'm doing my research, and this issue happens to another person Cloudflare issue