© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
16 replies
Deleted User

SvelteKit (Vite) + Supabase Error on from()

My supabase JS instance works for creating auth users, but when trying to do the following, my server gives me an error and quits. Unsure what this error is about 🤔
async function check_valid_urlid(urlid) {
  const { data, error } = await supabase
    .from()
    .select()

  if (error) throw new Error(error.message)
  return data;
 }

let userdata = check_valid_urlid(params.slug);
console.log(userdata);
async function check_valid_urlid(urlid) {
  const { data, error } = await supabase
    .from()
    .select()

  if (error) throw new Error(error.message)
  return data;
 }

let userdata = check_valid_urlid(params.slug);
console.log(userdata);

If you are wondering, I tried with a valid database name, so it is not a problem with from() being empty. It does not seem like any request is being made.

The error:
Promise {
  <rejected> TypeError: Cannot read properties of undefined (reading 'from')
      at check_valid_urlid (/src/routes/user/[slug]/+page.js:10:14)
      at load (/src/routes/user/[slug]/+page.js:18:20)
      at load_data (file:///home/main/Coding/test/node_modules/@sveltejs/kit/src/runtime/server/page/load_data.js:238:38)
      at async file:///home/main/Coding/test/node_modules/@sveltejs/kit/src/runtime/server/page/index.js:170:13
}
/src/routes/user/[slug]/+page.js:10
            .from()
             ^
Promise {
  <rejected> TypeError: Cannot read properties of undefined (reading 'from')
      at check_valid_urlid (/src/routes/user/[slug]/+page.js:10:14)
      at load (/src/routes/user/[slug]/+page.js:18:20)
      at load_data (file:///home/main/Coding/test/node_modules/@sveltejs/kit/src/runtime/server/page/load_data.js:238:38)
      at async file:///home/main/Coding/test/node_modules/@sveltejs/kit/src/runtime/server/page/index.js:170:13
}
/src/routes/user/[slug]/+page.js:10
            .from()
             ^
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

Supabase SvelteKit Helper
SupabaseSSupabase / help-and-questions
4y ago
Sveltekit Supabase Auth Helpers cookies.set() error
SupabaseSSupabase / help-and-questions
3y ago
supabase-js v2 runtime error with SvelteKit
SupabaseSSupabase / help-and-questions
4y ago
Supabase Quickstart SvelteKit Tutorial
SupabaseSSupabase / help-and-questions
4y ago