Git Integration Next JS Cloudflare pages

how can i add git integration to an existing page deployment for next js? the docs only mention to create a new page and says i cant add. should i delete my old application and create a new one?
No description
4 Replies
Chaika
Chaika4mo ago
You can't switch a Pages Direct Upload Project to a Github Integrated Project without recreating it, like it says Your options are basically to use Github Actions (Pages Action) and/or wrangler upload directly to deploy your project or recreate it as a Github integrated one to uses Pages CI/CD
solbass
solbass4mo ago
09:40:41.562 ⚡️ The following routes were not configured to run with the Edge Runtime:
09:40:41.562 ⚡️ - /api/auth/[...nextauth]
09:40:41.563 ⚡️ - /api/protected
09:40:41.563 ⚡️ - /index
09:40:41.563 ⚡️
09:40:41.563 ⚡️ Please make sure that all your non-static routes export the following edge runtime route segment config:
09:40:41.563 ⚡️ export const runtime = 'edge';
09:40:41.562 ⚡️ The following routes were not configured to run with the Edge Runtime:
09:40:41.562 ⚡️ - /api/auth/[...nextauth]
09:40:41.563 ⚡️ - /api/protected
09:40:41.563 ⚡️ - /index
09:40:41.563 ⚡️
09:40:41.563 ⚡️ Please make sure that all your non-static routes export the following edge runtime route segment config:
09:40:41.563 ⚡️ export const runtime = 'edge';
@Chaika does this have to be set at the top of every api file? update, i tried to add to my root layout and then the api route file individually, receiving this error Module not found: Can't resolve 'crypto'
Chaika
Chaika4mo ago
You'd have better luck asking in #next-on-pages, but I think so.
Module not found: Can't resolve 'crypto'
Sounds like your code/one of your depends is trying to use crypto. You can enable nodejs_compat flag and get node:crypto with some parts supported (https://developers.cloudflare.com/workers/runtime-apis/nodejs/crypto/) but would still break if it's trying crypto directly
solbass
solbass4mo ago
thanks i needed to update next auth to v5
Want results from more Discord servers?
Add your server
More Posts