You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a copy of a troubleshooting article on Supabase's docs site. It may be missing some details from the original. View the original article.
When bundling an application that uses @supabase/supabase-js, you may see warnings like:
"PostgrestError" is imported from external module "@supabase/postgrest-js" but never used in "...supabase-js/dist/index.mjs".
"FunctionRegion", "FunctionsError", "FunctionsFetchError", "FunctionsHttpError" and "FunctionsRelayError" are imported from external module "@supabase/functions-js" but never used in "...".
This is a false positive — your bundle is correct and no code is missing.
Why this happens
@supabase/supabase-js re-exports error types like PostgrestError and FunctionsError so you can import them directly from @supabase/supabase-js. The build tool merges all imports from the same package into a single statement in the output:
// dist/index.mjs (simplified)import{PostgrestClient,PostgrestError}from'@supabase/postgrest-js'// ^ used internally ^ re-exported for you
Vite/Rollup checks which names from that import are referenced in the code body and flags PostgrestError as unused, because it only appears in an export statement — not called or assigned. The export itself is the real usage, but this check doesn't account for re-exports. Tree-shaking and bundle size are unaffected.
Suppress the warning
Vite / Rollup (vite.config.js or rollup.config.js)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
This is a copy of a troubleshooting article on Supabase's docs site. It may be missing some details from the original. View the original article.
When bundling an application that uses
@supabase/supabase-js, you may see warnings like:This is a false positive — your bundle is correct and no code is missing.
Why this happens
@supabase/supabase-jsre-exports error types likePostgrestErrorandFunctionsErrorso you can import them directly from@supabase/supabase-js. The build tool merges all imports from the same package into a single statement in the output:Vite/Rollup checks which names from that import are referenced in the code body and flags
PostgrestErroras unused, because it only appears in anexportstatement — not called or assigned. The export itself is the real usage, but this check doesn't account for re-exports. Tree-shaking and bundle size are unaffected.Suppress the warning
Vite / Rollup (
vite.config.jsorrollup.config.js)Nuxt (
nuxt.config.ts)All reactions