If anyone searches this, managed to get it working. My root `layout.tsx` file had the following: ```

If anyone searches this, managed to get it working. My root layout.tsx file had the following:
export const runtime = 'edge';
export const dynamic = 'force-dynamic';
export const revalidate = 0;
export const runtime = 'edge';
export const dynamic = 'force-dynamic';
export const revalidate = 0;
Which for my use case was fine, nearly every page retrieves data from a CMS, not much gets statically rendered. Deleting the root layout fixed it and it built successfully, I wonder if it's because I'm using the platforms approach, so don't have a root page.tsx file, only a layout. Will look into it more tomorrow but at least I've found how to make it compile!
17 Replies
LiveWithCodeAnkit
Hey everyone, I have the same issue. In my root file, layout.tsx, I added the following lines of code: export const runtime = 'edge'; export const dynamic = 'force-dynamic'; export const revalidate = 0;
No description
D Trombett
D Trombett3mo ago
I think the problem is that the edge runtime doesn't have http and https modules so you should use the built-in fetch
LiveWithCodeAnkit
@D Trombett But in the Vercel deployment, it runs perfectly without these lines: export const runtime = 'edge'; export const dynamic = 'force-dynamic'; export const revalidate = 0;
No description
LiveWithCodeAnkit
if any solution for this please give me
No description
D Trombett
D Trombett3mo ago
Because Cloudflare next-on-pages requires edge runtime at the moment While vercel doesn't
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Pandeo
Pandeo3mo ago
What does the runtime edge limit in functionalities ?
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Pandeo
Pandeo3mo ago
Oh that interesting ahah, because i want to make a next app using supabase so i imagine that i will have some problem to host it on pages ^^'
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Pandeo
Pandeo3mo ago
I will finish by hosting it on my own kube cluster...
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Pandeo
Pandeo3mo ago
Mmhhh, i have some people who are hosting on pages their app with supabase on reddit. But by reading on this feed it look like also some people facing some issue using pages and supabase
James
James3mo ago
This is a next.js build error and not something we have control over
Tom4sko
Tom4sko3mo ago
i dont have error in code :{
No description
Tom4sko
Tom4sko3mo ago
what is wrong with it
Isaac McFadyen
Isaac McFadyen3mo ago
You have ESLint enabled and set to error when it finds a lint that's not followed. Either fix the issue (don't use any), use a comment above it to allow it (eslint allow I believe?) or disable the ESLint lint.
Want results from more Discord servers?
Add your server