Certainly! When posting on a developer forum, it's helpful to provide a clear and concise question. Here's a suggestion for your forum post:
Title: Issue with Supabase Client and Dynamic Imports
I'm encountering an issue with my Next.js project where I'm using the Supabase client with dynamic imports. The error message I'm receiving is as follows:
Import trace for requested module: external "https://esm.sh/@supabase/supabase-js@2" ./config/supabaseClient.js ./app/waitlist/page.jsx ⨯ external "https://esm.sh/@supabase/supabase-js@2" The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script
Import trace for requested module: external "https://esm.sh/@supabase/supabase-js@2" ./config/supabaseClient.js ./app/waitlist/page.jsx Here is my supabaseClient.js file:
export { supabase }; And here's a snippet from my page.jsx file:
import supabase from "@/config/supabaseClient"; // ... I've tried adjusting the imports and making sure the dynamic import syntax is supported, but I'm still encountering this issue. Any insights or suggestions on how to resolve this would be greatly appreciated!
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.