Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct config for Prisma with Supabase on Cloudflare #241

Open
mtzrmzia opened this issue Aug 24, 2024 · 4 comments
Open

Correct config for Prisma with Supabase on Cloudflare #241

mtzrmzia opened this issue Aug 24, 2024 · 4 comments
Labels
question Further information is requested

Comments

@mtzrmzia
Copy link

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:

  1. Install prisma and @prisma/client dependencies then add prisma generate to build 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]"
}
  1. Create prisma/schema.prisma file:
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}
  1. 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

@atinux
Copy link
Contributor

atinux commented Aug 24, 2024

Duplicate of #38

Would you mind reading https://github.com/nuxt-hub/core/pull/58/files and see if this works?

@atinux atinux added the question Further information is requested label Aug 24, 2024
@mtzrmzia
Copy link
Author

Duplicate of #38

Would you mind reading https://github.com/nuxt-hub/core/pull/58/files and see if this works?

The example uses sqlite and ignores the DATABASE_URL but i'm using postgresql with supabase... just dont work

Copy link
Contributor

atinux commented Aug 24, 2024

@CristobalMedrano
Copy link

I had a similar problem, you could try this prisma/prisma#23500 (comment). It seems to be a problem with Nitro and Prisma

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants