Next.js Discord

Discord Forum

Using SHARP with yarn and Mac M1 with Vercel

Unanswered
Dogue Brasileiro posted this in #help-forum
Open in Discord
Dogue BrasileiroOP
Hello!

I cannot for the life of me figure out how to get sharp running on vercel functions. I get it working locally with yarn add sharp --ignore-engines, but I still get this warning on vercel when running the function:
⨯ Error: Could not load the "sharp" module using the linux-x64 runtime

I have even tried using the supportedArchitectures in package.json

2 Replies

Toyger
looks like you need to downgrade sharp version https://github.com/lovell/sharp/issues/3870#issuecomment-1833121113
Dogue BrasileiroOP
It stopped all local warnings, but the function still returns 500