next.js: RangeError: Maximum call stack size exceeded (facing issue in prod build alone, dev version working fine)
Link to the code that reproduces this issue
https://github.com/Arun12Muralidharan/BlogApp
To Reproduce
- After build in local / vercel site, while trying to login user / register user / create new post / edit existing post. Facing “RangeError: Maximum call stack size exceeded”.
- Page got stuck there itself (to overcome such behaviour, i had added error page), still same issue.
- The issue not occuring in dev mode.
Please checkout the running version (with issue) of the app at “https://am-blog-app.vercel.app/”
Current vs. Expected behavior
Current Behaviour: RangeError: Maximum call stack size exceeded in prod version alone. (In Dev mode, no issues).
Expected: Error free module in prod version too.
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro Service Pack 1
Binaries:
Node: 18.17.1
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 13.5.6
eslint-config-next: 13.5.6
react: 18.2.0
react-dom: 18.2.0
typescript: 5.2.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Additional context
Please checkout the running version (with issue) of the app at “https://am-blog-app.vercel.app/”
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Comments: 19 (3 by maintainers)
Error Resolved Successfully, error counter by
sharplib next use for Image Processing to serve images and by reducing the version of sharp0.33.2to0.33.1resolves the error andvercel buildexecuted successfully…@leerob I never intended to install sharp but Next.js throw an terminal warn that I should install sharp for production. Maybe this warn should be deleted.
The issue is gets resolved in nextjs v14. I had craeted the issue, when i was using v13
that is not a solution, it’s just a workaround.