Next.js deployment fails on pages, works in Vercel, Netlify

Page: toph.pages.dev Deployment ID: bf55d2ba-ceef-458a-99d4-c48d923f1797 Account ID: 6a2784243169ac723308b65ae743e5ca I'm trying to deploy my project to cf pages but it fails while giving the following error. It works fine on my machine, netlify and vercel. Only CF pages seems to have this problem. I tried upgrading the node version but that didn't solve it either. Error:
11:38:00.579 ▲ ✓ Generating static pages (4/4)
11:38:01.017 ▲ Finalizing page optimization ...
11:38:01.017 ▲ Collecting build traces ...
11:38:06.494 ▲ RangeError: Maximum call stack size exceeded
11:38:06.495 ▲ at parse (/opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:6313)
11:38:06.495 ▲ at picomatch.makeRe (/opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:21670)
11:38:06.495 ▲ at picomatch (/opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:19637)
11:38:06.495 ▲ at /opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:19294
11:38:06.495 ▲ at Array.map (<anonymous>)
11:38:06.495 ▲ at picomatch (/opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:19286)
11:38:06.495 ▲ at micromatch.isMatch (/opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:1090)
11:38:06.495 ▲ at /opt/buildhome/repo/node_modules/next/dist/build/collect-build-traces.js:245:48
11:38:06.496 ▲ at shouldIgnore (/opt/buildhome/repo/node_modules/next/dist/build/collect-build-traces.js:75:9)
11:38:06.496 ▲ at /opt/buildhome/repo/node_modules/next/dist/build/collect-build-traces.js:86:23
11:38:06.606 ▲ Error: Command "npm run build" exited with 1
11:38:00.579 ▲ ✓ Generating static pages (4/4)
11:38:01.017 ▲ Finalizing page optimization ...
11:38:01.017 ▲ Collecting build traces ...
11:38:06.494 ▲ RangeError: Maximum call stack size exceeded
11:38:06.495 ▲ at parse (/opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:6313)
11:38:06.495 ▲ at picomatch.makeRe (/opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:21670)
11:38:06.495 ▲ at picomatch (/opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:19637)
11:38:06.495 ▲ at /opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:19294
11:38:06.495 ▲ at Array.map (<anonymous>)
11:38:06.495 ▲ at picomatch (/opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:19286)
11:38:06.495 ▲ at micromatch.isMatch (/opt/buildhome/repo/node_modules/next/dist/compiled/micromatch/index.js:15:1090)
11:38:06.495 ▲ at /opt/buildhome/repo/node_modules/next/dist/build/collect-build-traces.js:245:48
11:38:06.496 ▲ at shouldIgnore (/opt/buildhome/repo/node_modules/next/dist/build/collect-build-traces.js:75:9)
11:38:06.496 ▲ at /opt/buildhome/repo/node_modules/next/dist/build/collect-build-traces.js:86:23
11:38:06.606 ▲ Error: Command "npm run build" exited with 1
No description
3 Replies
Nusab Taha
Nusab TahaOP4mo ago
The build works everywhere else. The only place it fails in CF pages
FrankyGreven
FrankyGreven4mo ago
hi, Nice to meet you
Nusab Taha
Nusab TahaOP4mo ago
Nice to meet you too. Do you know how to solve it?
Want results from more Discord servers?
Add your server