RangeError: Maximum call stack size exceeded
Answered
Japanese Bobtail posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
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?
If i uninstall this package the error is gone. I am confused because on my development server this error isnt there. Anyone can help?
3 Replies
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
downgrade sharp to iirc 0.33.1, the error will go
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
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](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
yes its a vercel bug, i think theyre working on it. until then keep sharp at 0.33.1