import { Database } from './database.types' - Build a User Management App with Next.js Tutorial

Hi I am following the tutorial on how to build a user management app and and using TS. I followed this part of the tutorial on how to create types, https://supabase.com/docs/guides/api/rest/generating-types and now have a types/supabase.ts file, but the import is now working even if I change it to import { Database } from './types/supabase.ts'; Attached are some screenshots thank you. Cannot find module './database.types' or its corresponding type declarations.
Generating TypeScript Types | Supabase Docs
How to generate types for your API and Supabase libraries.
No description
No description
3 Replies
loup
loup2y ago
The name of your file is supabase.ts not database.types and if u import from @/app/auth-form.tsx u have to use ../types/supabase.ts
ApexCoder
ApexCoderOP2y ago
I'll try it thx
loup
loup2y ago
U can use absolute path if the @ is setup. For example try @/types/supabase.tsx

Did you find this page helpful?