When I add this piece of code from sharp package (that is a image processing package):
await sharp(req.file.path)
.resize(500)
.jpeg({ quality: 50 })
.toFile(path.resolve(req.file.destination, “resized”, filename));
I get this error:
Illegal instruction (core dumped)
When I remove it, everything is ok. I’m very confused. What is wrong with that code?