Error: Command "npm run build" exited with SIGABRT
Answered
Brown bear posted this in #help-forum
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
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
1 Reply
Brown bearOP
found a fix.
npm i sharp@0.32.6
npm i sharp@0.32.6
Answer