nextjs-subscription-payments
nextjs-subscription-payments copied to clipboard
Issues with local development
Hi,
I followed the step-by-step guide, and everything seems to work well in production. But, when I want to work with a local version, it's getting tougher.
I also followed the guide, using Vercel and Stripe CLIs, but when I run npm run dev, I have this error showing up:
Error: either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!
I double checked my env variables, my Supabase createClient() and everything seems to be good.
supabase-admin.ts
const supabaseAdmin = createClient<Database>(
process.env.NEXT_PUBLIC_SUPABASE_URL || '',
process.env.SUPABASE_SERVICE_ROLE_KEY || ''
);
Did you guys already have this issue and found a solution?
Thanks in advance!
You have to rename your .env.local.example
file to .env.local