does it work on next-on-pages?

does it work on next-on-pages?
7 Replies
bun
bun2w ago
@mr nooli
Unknown User
Unknown User2w ago
Message Not Public
Sign In & Join Server To View
lucasp
lucasp2w ago
hello im getting this error, someone knows whats happend?
import { auth } from '@/auth'
import { getUser } from '@/client/services/user.service'
import Home from '@/components/pages/Home'
import { redirect } from 'next/navigation'

export const runtime = 'edge'

export default async function Main() {
const session = await auth()

const user = await getUser(session?.user?.localId ?? '')

if (!user?.cargo_giver) redirect('/profile')

return <Home />
}
import { auth } from '@/auth'
import { getUser } from '@/client/services/user.service'
import Home from '@/components/pages/Home'
import { redirect } from 'next/navigation'

export const runtime = 'edge'

export default async function Main() {
const session = await auth()

const user = await getUser(session?.user?.localId ?? '')

if (!user?.cargo_giver) redirect('/profile')

return <Home />
}
server side exception and when check logs "logs": [ { "message": [ "Error: The 'cache' field on 'RequestInitializerDict' is not implemented." ],
Spajk
Spajk2w ago
This might be more of an nextjs issue then next-on-pages, but I randomly started getting this error:
⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
⚡️
⚡️ The following routes were not configured to run with the Edge Runtime:
⚡️ - /_not-found
⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
⚡️
⚡️ The following routes were not configured to run with the Edge Runtime:
⚡️ - /_not-found
The thing is, I don't have a not-found page I can see that previously in the build log it appeared as this
Route (app) Size First Load JS
▲ ┌ ƒ / 8.18 kB 95.3 kB
▲ ├ ○ /_not-found 873 B 88 kB
Route (app) Size First Load JS
▲ ┌ ƒ / 8.18 kB 95.3 kB
▲ ├ ○ /_not-found 873 B 88 kB
and that produced successful builds but now it's
▲ Route (app) Size First Load JS
▲ ┌ ƒ / 3.64 kB 90.8 kB
▲ ├ ƒ /_not-found 873 B 88 kB
▲ Route (app) Size First Load JS
▲ ┌ ƒ / 3.64 kB 90.8 kB
▲ ├ ƒ /_not-found 873 B 88 kB
essequiel
essequiel2w ago
hi everyone is there someone that can help me creating a dynamic page? when i create a folder and add a [id].tsx file inside, i can't make it work
Kyzer
Kyzer2w ago
You can just make a not found page with the edge runtime, I ran in to that issue when my root layout page was needing the edge runtime https://developers.cloudflare.com/pages/framework-guides/nextjs/ssr/troubleshooting/#app-router
Spajk
Spajk2w ago
That's exactly what happened, thanks!
Want results from more Discord servers?
Add your server