Next.js Discord

Discord Forum

RangeError: Maximum call stack size exceeded

Answered
Japanese Bobtail posted this in #help-forum
Open in Discord
Avatar
Japanese BobtailOP
Hi there. I am using sharp library because npm run start displays "For production Image Optimization with Next.js, the optional 'sharp' package is strongly recommended. Run 'npm i sharp', and Next.js will use it automatically for Image Optimization." After installation anything is fine. But if i deploy it to vercel i am getting this error: RangeError: Maximum call stack size exceeded.

If i uninstall this package the error is gone. I am confused because on my development server this error isnt there. Anyone can help?
Answered by joulev
downgrade sharp to iirc 0.33.1, the error will go
View full answer

3 Replies

Avatar
joulev
downgrade sharp to iirc 0.33.1, the error will go
Answer
Avatar
Japanese BobtailOP
I've deleted the data cache on vercel and the sparp package downgraded to "sharp": "0.33.1" - It works. So many thanks sir.
Avatar
joulev
yes its a vercel bug, i think theyre working on it. until then keep sharp at 0.33.1