Next.js deployment fails on pages, works in Vercel, Netlify
Page:
toph.pages.dev
toph.pages.dev
Deployment ID:
bf55d2ba-ceef-458a-99d4-c48d923f1797
bf55d2ba-ceef-458a-99d4-c48d923f1797
Account ID:
6a2784243169ac723308b65ae743e5ca
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 exceeded11: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:1929411: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:4811: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:2311: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 exceeded11: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:1929411: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:4811: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:2311:38:06.606 ▲ Error: Command "npm run build" exited with 1