Next.js Discord

Discord Forum

Error: Command "npm run build" exited with SIGABRT

Answered
Brown bear posted this in #help-forum
Open in Discord
Brown bearOP
getting this error while building the project in vercel.

import hero from "/public/home/hero.png";

<div className="px-4">
<Image
src={hero}
alt="our projects"
priority={true}
className="-mt-2 max-w-[800px] w-full"
placeholder="blur"
/>
</div>

when im using static imports like this, the error occurs.

<div className="px-4">
<Image
src="/home/hero.png"
width={800}
height={499}
alt="our projects"
priority={true}
className="-mt-2 max-w-[800px] w-full"
placeholder="blur"
/>
</div>

but when i do like this, error is gone. why is that?
attached my next config also
Answered by Brown bear
found a fix.
npm i sharp@0.32.6
View full answer

1 Reply

Brown bearOP
found a fix.
npm i sharp@0.32.6
Answer