Closed michielswaanen closed 3 months ago
Please see https://sharp.pixelplumbing.com/install#building-from-source for the extra dependencies required to build from source.
Adding the following line to the Dockerfile + pnpm add node-addon-api node-gyp
did the trick.
ENV SHARP_FORCE_GLOBAL_LIBVIPS=1
Thanks for the help, somehow looked over this in the docs 👀
Possible bug
Is this a possible bug in a feature of sharp, unrelated to installation?
npm install sharp
completes without error.node -e "require('sharp')"
completes without error.If you cannot confirm both of these, please open an installation issue instead.
Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of
sharp
that is not the latest, please open an issue against that package instead.What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?Does this problem relate to file caching?
The default behaviour of libvips is to cache input files, which can lead to
EBUSY
orEPERM
errors on Windows. Usesharp.cache(false)
to switch this feature off.Didn't test this because I'm not running on Windows
sharp.cache(false)
does not fix this problem.What are the steps to reproduce?
Run
bash scripts/start.sh
to get started, Docker is a prerequisite.https://github.com/michielswaanen/debug-sharp-custom-libvips
What is the expected behaviour?
Sharp should convert the custom file types added to the custom libvips build. While libvips can handle these conversions, Sharp currently does not.
Libvips config:
Please provide sample image(s) that help explain this problem