Closed thevarunaditya closed 5 months ago
There are a couple of things happening here.
sharp: Detected globally-installed libvips v8.15.2 sharp: Attempting to build from source via node-gyp sharp: Please add node-addon-api to your dependencies
This suggests you might be attempting to use a globally-installed libvips with sharp. If this is the case, please see https://sharp.pixelplumbing.com/install#building-from-source for more information about the requirements.
ERR_DLOPEN_FAILED: dlopen(/var/folders/q1/09rs6v5d03b20kqwggc4dllm0000gn/T/.com.varunaditya.sparxsolver.e2pyJT, 0x0001): Library not loaded: @rpath/libvips-cpp.42.dylib
This suggests you might be using a JavaScript bundler such as Webpack. If this is the case, please see https://sharp.pixelplumbing.com/install#bundlers for more information about how to indicate that sharp should be treated as an "external" package.
I experience Error: Could not load the 'sharp' module using the linux-x64 runtime
using 0.33.4 on Firebase cloud functions
@monohuman Were you able to make any progress with this?
No, I just used a different library and it worked.
On Thu, Jun 13, 2024 at 4:49 PM Lovell Fuller @.***> wrote:
@monohuman https://github.com/monohuman Were you able to make any progress with this?
— Reply to this email directly, view it on GitHub https://github.com/lovell/sharp/issues/4122#issuecomment-2165899964, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASUBMK7MHM55C7U4YQUQD43ZHGWQLAVCNFSM6AAAAABIU3XNIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRVHA4TSOJWGQ . You are receiving this because you were mentioned.Message ID: @.***>
Progress of a different kind ;)
Thanks for the update - I'll close.
Hey! For anyone who stumbles across this problem as I did. The solution that worked for me was to add sharp to excluded packages in my bundler configuration, as I had forgotten to do this step. https://sharp.pixelplumbing.com/install#bundlers Have a nice day :)
Possible install-time or require-time problem
You must confirm both of these before continuing.
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.Are you using a supported runtime?
^18.17.0 || ^20.3.0 || >=21.0.0
If you cannot confirm any of these, please upgrade to the latest version and try again before opening an issue.
Are you using a supported package manager and installing optional dependencies?
--include=optional
--no-optional=false
If you cannot confirm any of these, please upgrade to the latest version of your chosen package manager and ensure you are allowing the installation of optional or multi-platform dependencies before opening an issue.
What is the complete error message, including the full stack trace?
What is the complete output of running
npm install --verbose --foreground-scripts sharp
in an empty directory?What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?