Error running Stripe Sync command
Mobutu1650 opened this issue · comments
Hello,
Running a local version, when attempting to sync strip products using yarn sync-stripe
i get the following error:
Error: supabaseUrl is required.
at SupabaseClient (c:\Users\Bureau\Desktop\BF-Next\BFBJ\BF\node_modules@supabase\supabase-js\dist\main\SupabaseClient.js:55:19)
at createClient (c:\Users\Bureau\Desktop\BF-Next\BFBJ\BF\node_modules@supabase\supabase-js\dist\main\index.js:35:12)
at (c:\Users\Bureau\Desktop\BF-Next\BFBJ\BF\src\utils\admin\supabase-admin-client.ts:4:30)
at Object. (c:\Users\Bureau\Desktop\BF-Next\BFBJ\BF\src\utils\admin\supabase-admin-client.ts:7:1)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Object.F (C:\Users\Bureau\AppData\Local\npm-cache_npx\fd45a72a545557e9\node_modules@esbuild-kit\cjs-loader\dist\index.js:1:941)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:121:18)
Apparently normal .env
files don't work when running scripts. Need to install something like direnv
so that the bash window can read the env variables. https://usebasejump.com/docs/environment-variables
An alternative temp solution is to just copy your keys etc manually into scripts/sync-stripe.ts
, utils/admin/stripe.ts
and utils/admin/supabase-admin-client.ts
to successfully run the yarn sync-stripe
command.
I've removed the need for syncing from the newest release, it now pulls directly from Stripe for this data