Vercel Deploy: `RangeError: Maximum call stack size exceeded`
Answered
Sully posted this in #help-forum
SullyOP
Hi all!
I'm trying to push my changes I made to my code (open source at https://github.com/AlexJSully/AlexJSully-Portfolio & https://alexjsully.me/) and during deploy to preview build I am getting the following error during Vercel Next build. How do I approach or fix it?
Error:
I'm trying to push my changes I made to my code (open source at https://github.com/AlexJSully/AlexJSully-Portfolio & https://alexjsully.me/) and during deploy to preview build I am getting the following error during Vercel Next build. How do I approach or fix it?
Error:
[17:23:49.978] ✓ Compiled successfully
[17:23:49.979] Linting and checking validity of types ...
[17:24:00.091] Collecting page data ...
[17:24:01.948] Generating static pages (0/7) ...
[17:24:01.985]
Generating static pages (1/7)
[17:24:02.142]
Generating static pages (3/7)
[17:24:02.498]
Generating static pages (5/7)
[17:24:02.802]
✓ Generating static pages (7/7)
[17:24:03.158] Finalizing page optimization ...
[17:24:03.158] Collecting build traces ...
[17:24:12.983] RangeError: Maximum call stack size exceeded
[17:24:12.983] at parse (/vercel/path0/node_modules/next/dist/compiled/micromatch/index.js:15:6313)
[17:24:12.983] at picomatch.makeRe (/vercel/path0/node_modules/next/dist/compiled/micromatch/index.js:15:21670)
[17:24:12.983] at picomatch (/vercel/path0/node_modules/next/dist/compiled/micromatch/index.js:15:19637)Answered by Sully
Just a heads up if any of you are still having this issue. It appears that sharp 0.33.2 is causing the issue, downgrade the sharp version should work: https://github.com/orgs/vercel/discussions/5449#discussioncomment-8118778
10 Replies
Laughing Gull
I have the same issue. Building fine locally.
Toyger
set
in next.config.js
it's some bug with sentry package
outputFileTracing: falsein next.config.js
it's some bug with sentry package
Laughing Gull
I noticed that @Sully and I are both using sharp. I made a fresh test nextjs app using vercel and when I add sharp package it reproduces this error. I am using sharp 0.33.2 and @Sully is using 0.33.1. Not sure who to report this to
Laughing Gull
outputFileTracing: false did resolve the issue, thanksâš Disabling outputFileTracing will not be an option in the next major version. Please report any issues you may be experiencing to https://github.com/vercel/next.js/issues
Masai Lion
Starting yesterday afternoon, I was having the same issue.
Setting
I don't understand, I did not make any major changes to my repo since the last stable deployment on January 10.
Setting
outputFileTracing: false in next.config.js did allow Vercel to build, however, now I'm getting a endless 500 errors:⨯ Error: Cannot find module '/var/task/.next/server/app/[slug]/page_client-reference-manifest.js'I don't understand, I did not make any major changes to my repo since the last stable deployment on January 10.
SullyOP
Just a heads up if any of you are still having this issue. It appears that sharp 0.33.2 is causing the issue, downgrade the sharp version should work: https://github.com/orgs/vercel/discussions/5449#discussioncomment-8118778
Answer
Masai Lion
Awesome, thank you so much!
BTW: around 10ET this morning, the builds started working again even with Sharp
BTW: around 10ET this morning, the builds started working again even with Sharp
0.33.2 🤷ðŸ»â€â™‚ï¸@Sully Just a heads up if any of you are still having this issue. It appears that sharp 0.33.2 is causing the issue, downgrade the sharp version should work: https://github.com/orgs/vercel/discussions/5449#discussioncomment-8118778
Acorn-plum gall
Hey Sully, I was still having this issue and this did fix the initial issue.
I'm now running into a separate problem where my API route that uses Sharp is returning a 405(), I'm happy to send the code over if you think you could help 🙂
This only happens on production servers, if you have any suggestions please let me know.
The server also gets these errors:
I'm now running into a separate problem where my API route that uses Sharp is returning a 405(), I'm happy to send the code over if you think you could help 🙂
This only happens on production servers, if you have any suggestions please let me know.
The server also gets these errors:
Acorn-plum gall
bump