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
I also have this error when I try to build my Next.js app:
./node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@supabase/supabase-js/src/index.ts:17:3
Type error: Re-exporting a type when 'isolatedModules' is enabled requires using 'export type'.
15 | FunctionsRelayError,
16 | FunctionsError,
> 17 | FunctionInvokeOptions,
| ^
18 | FunctionRegion,
19 | } from '@supabase/functions-js'
20 | export * from '@supabase/realtime-js'
FunctionInvokeOptions is exported both in functions-js and supabase-js (note: I don't use functions-js directly).
Setting isolatedModules to false isn't possible at the moment, because next build forces it to true:
We detected TypeScript in your project and reconfigured your tsconfig.json file for you. Strict-mode is set to false by default.
The following mandatory changes were made to your tsconfig.json:
- isolatedModules was set to true (requirement for SWC / Babel)
For now, the workaround is to add this in next.config:
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// This is to workaround the supabase-js error, see isolatedModule in tsconfig.json
// !! WARN !!
ignoreBuildErrors: true,
},
Bug report
Describe the bug
It is a Typescript syntax error with
isolatedModules
onTo Reproduce
I was building a docker image for my application using this template on NextJS docs
Building a NextJS app with supabase should raise this error
This is my code My Code.
Expected behavior
Expected it to build when the Dockerfile ran
next build
Screenshots
This is the error I got from docker build
https://drive.google.com/file/d/1HRU_2bOrK5zQPGKvxAIPZ52_TPAv9NO9/view?usp=sharing
System information
Additional context
I am using NextJS with TypeScript+SWC.
I tried setting isolatedModules to false, but when I ran npm run build it set it back to true
The text was updated successfully, but these errors were encountered: