BuildShipBBuildShip
Powered by
Md RashedM
BuildShip•2y ago•
3 replies
Md Rashed

Getting error for resizing images

import sharp from 'sharp';
export default async function resizeImage({
    imagePath
}) {
    const resizedImagePath = ${process.env.BUCKET_FOLDER_PATH}/${Date.now()}_resized.png;
    await sharp(${process.env.BUCKET_FOLDER_PATH}/${imagePath}).resize(40, 40).toFile(resizedImagePath);
    return resizedImagePath;
}
import sharp from 'sharp';
export default async function resizeImage({
    imagePath
}) {
    const resizedImagePath = ${process.env.BUCKET_FOLDER_PATH}/${Date.now()}_resized.png;
    await sharp(${process.env.BUCKET_FOLDER_PATH}/${imagePath}).resize(40, 40).toFile(resizedImagePath);
    return resizedImagePath;
}


Error: Could not load the "sharp" module using the linuxmusl-x64 runtime Possible solutions: - Ensure optional dependencies can be installed: npm install --include=optional sharp yarn add sharp --ignore-engines - Ensure your package manager supports multi-platform installation: See https://sharp.pixelplumbing.com/install#cross-platform - Add platform-specific dependencies: npm install --os=linux --libc=musl --cpu=x64 sharp - Consult the installation documentation: See https://sharp.pixelplumbing.com/install
sharp - High performance Node.js image processing
sharp - High performance Node.js image processing
BuildShip banner
BuildShipJoin
Join founders, builders, devs using Low-code / No-code to create backend, APIs, scheduled Jobs, automation, AI workflows
7,971Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

instruct buildship for consistency in images
FatSamSAFFatSamSA / ❓・buildship-help
2y ago
Why am I getting this error?
ZenomaniaZZenomania / ❓・buildship-help
2y ago
Getting error when trying to test a flow
Sebastian AESSebastian AE / ❓・buildship-help
9mo ago
Getting "Service unavailabe" for the rest api request
rakoo04Rrakoo04 / ❓・buildship-help
5mo ago