© 2026 Hedgehog Software, LLC

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

Cannot read from database in next.js page

When trying to access the data from supabase, I get thrown this error
There was an error: TypeError: Cannot read properties of undefined (reading 'from')
There was an error: TypeError: Cannot read properties of undefined (reading 'from')
. when trying to do:

const { data, error } = await supabase
  .from('clips')
  .select('url')
const { data, error } = await supabase
  .from('clips')
  .select('url')


That's the first issue, the second is having a lot of trouble being able to grab data from the db within a next.js page, probably because of the above issue, but what would the best way to approach this be? Make the async call within
useEffect()
useEffect()
? or is there some better way I'm not seeing or found online. Any help would be amazing
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

Next.js protect login page from authenticated users
SupabaseSSupabase / help-and-questions
4y ago
Stuck reading Data from the database and showing it in a page with Next.js (Next Auth Adapter)
SupabaseSSupabase / help-and-questions
4y ago
signOut TypeError Cannot read properties of null (reading 'user') -- Next.js
SupabaseSSupabase / help-and-questions
4y ago
import { Database } from './database.types' - Build a User Management App with Next.js Tutorial
SupabaseSSupabase / help-and-questions
3y ago