© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
erztemplerobba

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.
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)
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
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

heroku to supabase migration
SupabaseSSupabase / help-and-questions
4y ago
supabase calling supabase.auth.user().id crashes server error 500
SupabaseSSupabase / help-and-questions
4y ago
Supabase + Expo + Hono server
SupabaseSSupabase / help-and-questions
13mo ago
Failed to deploy supabase edge to supabase server
SupabaseSSupabase / help-and-questions
4mo ago