Skip to content

Error thrown from SupabaseClient.ts:75 Uncaught Error: supabaseUrl is required, even though both variables are there. #13

@susmita-karibu

Description

@susmita-karibu

Hi,

I followed the intsructions in this video (https://www.youtube.com/watch?v=Gz9bvYybaws&list=PL4cUxeGkcC9hUb6sHthUEwG7r9VDPBMKO&index=2)

  1. added the following in .env
REACT_APP_SUPABASE_URL=<url from my project>
REACT_APP_ANON_KEY=<copied from my dashboard>
  1. created supabaseClient.js as instructed.
import { createClient } from '@supabase/supabase-js';
const supabaseUrl = process.env.REACT_APP_SUPABASE_URL;
const supabaseKey = process.env.REACT_APP_ANON_KEY;
const supabase = createClient(supabaseUrl, supabaseKey); // got supabaseUrl is required error, in spite of this

export default supabase;
  1. imported correctly in my Home.js file.
import supabase from "../config/supabaseClient"

const Home = () => {
  console.log(supabase);
  return (
    <div className="page home">
      <h2>Home</h2>
    </div>
  )
}

export default Home

and still got the following error
Screenshot 2024-09-04 at 11 47 23 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions