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?
4 Replies
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
@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'
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 directlythanks
i needed to update next auth to v5