Skip to content

Weird type errors with 2.56.0 #1542

@krankos

Description

@krankos

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

I get the following error when using 2.56.0. Same code build with no errors on 2.55.0. I have my types setup correctly too.

Type error: Property 'onboarded' does not exist on type 'never'.

To Reproduce

  • generate types
  • use supabase SSR with Nextjs.
  • use SSR client with cookies and everything
  • select

Example code

    const {
        data: { user },
    } = await supabase.auth.getUser()

    if (user?.id) {
        const { data: profile } = await supabase
            .from('profiles')
            .select('onboarded')
            .eq('id', user.id)
            .single()

        if (profile?.onboarded === true) {
            redirect('/dashboard')
        } else {
            redirect('/onboarding')
        }
    }

Expected behavior

Should build.

System information

  • Nextjs 15
  • pnpm

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions