Supabase crashes heroku server

When uploading my server to heroku, supabase seems to crash the application with the error:
2022-08-23T05:30:11.864679+00:00 app[web.1]: /app/node_modules/@supabase/supabase-js/dist/main/SupabaseClient.js:51
2022-08-23T05:30:11.864681+00:00 app[web.1]: throw new Error('supabaseUrl is required.');
2022-08-23T05:30:11.864682+00:00 app[web.1]: ^
2022-08-23T05:30:11.864682+00:00 app[web.1]:
2022-08-23T05:30:11.864682+00:00 app[web.1]: Error: supabaseUrl is required.


On my local machine, everything works fine. I'm using
const { createClient } = require('@supabase/supabase-js')
const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_SERVICE_KEY)
in my server to perform db queries as described in the documentation. The env variables seem to be configured correctly in my .env otherwise it wouldn't work locally.

What could be the problem here?
sberror.jpg
Was this page helpful?