Edge functions run on Deno, which doesn't look in node_modules for bare names. Use an npm: specifier:
import Stripe from 'npm:stripe@17'
const stripe = new Stripe(Deno.env.get('STRIPE_SECRET_KEY')!)Or, to keep imports clean, add a deno.json in the function folder:
{ "imports": { "stripe": "npm:stripe@17" } }Then import Stripe from 'stripe' works. Pin the version, otherwise a deploy months from now pulls whatever is latest. And set the key with supabase secrets set STRIPE_SECRET_KEY=..., your .env.local isn't deployed.