Resolving 'deleteUser' Property Issue with SupabaseAuthClient in React

I'm currently working on a React project where I need to implement a feature to delete a user account using Supabase. My code involves using SupabaseAuthClient for authentication and account management. However, I'm encountering an issue where the property deleteUser does not seem to exist on the SupabaseAuthClient type, as indicated by the error message: "Property 'deleteUser' does not exist on type 'SupabaseAuthClient'."

I'm stuck at the step where I need to delete the user, as the deleteUser method seems unrecognized. I've already ensured that my Supabase and React setups are correct.

// Relevant Code Snippet
const deleteUserAccount = async () => {
  // ... delete posts ...
  // delete user
  const { error: deleteUserError } = await supabase.auth.deleteUser(userId)
  // ... following code ...
}
Was this page helpful?