showing this error in deploy: Could not load the "sharp" module using the linux-x64 runtime
Solve: package downgrade in "0.32.6" version
package link: https://www.npmjs.com/package/sharp/v/0.32.6
Bangeli:
vercel deployment er somoy kew Build error occurred Error: Could not load the "sharp" module using the linux-x64 runtime ei error ti face korle apnar sharp package ti "0.32.6" ei version a downgrade kore er pore deploy korben. Taholei solve hoye jabe.
package link: https://www.npmjs.com/package/sharp/v/0.32.6
Top comments (2)
In my case, I was deploying my application on AWS Elastic Beanstalk. However I needed to manually specify the installation of the sharp package using the "cpu" and "os" flags, even though that "sharp" was already declared in my package.json.
So after running
npm install
I had to addnpm install --cpu=arm64 --os=linux --libc=musl sharp
to my application's buildspec file, since I am deploying my app in Linux Machines with arm64 architecture.This solved my issue.
Ref to the docs: sharp.pixelplumbing.com/install#cr...
Provavelmente você está desenvolvendo no windows e está tentando colocar para rodar no Linux. Nestes casos, o package-lock fica com a sua configuração, e ela não roda no Linux.
Ou você faz o downgrade do Sharp ou aprende a usar docker com wsl