This repository was archived by the owner on Oct 9, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 174
Using different schema for Supabase prevents build, results in errorย #478
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
Heya, I'm having trouble trying to use different table schema using Supabase for the template refine project
// utility/supabaseClient.ts
export const supabaseClient = createClient(SUPABASE_URL, SUPABASE_KEY, {
db: {
// problematic part vv
schema: "custom",
},
auth: {
persistSession: true,
},
});That exact code results in the following error.
22:08:57.278 Executing user command: npm run build
22:08:57.892
22:08:57.892 > [email protected] build
22:08:57.892 > tsc && refine build
22:08:57.892
22:09:02.920 src/App.tsx(328,48): error TS2345: Argument of type 'SupabaseClient<any, "custom", any>' is not assignable to parameter of type 'SupabaseClient<any, "public", any>'.
22:09:02.921 Type '"custom"' is not assignable to type '"public"'.
22:09:02.921 src/App.tsx(329,48): error TS2345: Argument of type 'SupabaseClient<any, "custom", any>' is not assignable to parameter of type 'SupabaseClient<any, "public", any>'.
22:09:02.967 Failed: build command exited with code: 2
22:09:03.827 Failed: error occurred while running build commandTo Reproduce
- Get the Supabase refine template
- Change supabaseClient options schema from "public" to anything else
npm run build- Error
Expected behavior
Works
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: macOS
- Browser (if applies): any
- Version of supabase-js: ^2.7.0
- Version of Node.js: v18.17.1
Additional context
Type '"product"' is not assignable to type '"public"'.ts(2322)
---
(property) schema?: ("public" extends keyof Database ? "public" : string & keyof Database) | undefined
Also npm start works but npm run build doesn't
mlukasik-dev, garygcchiu and dfang
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working