question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Global libvips version does not get detected

See original GitHub issue

I am trying to use the globally installed libvips with sharp, but it does not get detected during the npm install.

Dockerfile:

FROM alpine:3.15
WORKDIR /usr/src/app
RUN apk --update add nodejs=~16 npm build-base vips vips-dev
RUN pkg-config --modversion vips-cpp
RUN npm install --build-from-source --verbose sharp

Relevant parts from the console logs:

...
Step #0: Step 4/8 : RUN pkg-config --modversion vips-cpp
Step #0:  ---> Running in 9b8cfaddb573
Step #0: 8.12.1
...
Step #0: npm info run sharp@0.29.3 install node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
Step #0: npm info run sharp@0.29.3 install { code: 0, signal: null }
Step #0: npm timing build:run:install:node_modules/sharp Completed in 19607ms
Step #0: npm timing build:run:install Completed in 19608ms
...

It works if I follow the instructions described in this issue, however, it uses an older version of sharp (0.28.0), alpine (3.14) and node (14).

What could be the reason that the globally installed libvips is not getting detected?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lovellcommented, Dec 30, 2021

Did you see my comment above?

libvips only supports opening EXR files via the filesystem

0reactions
tastntcommented, Dec 30, 2021

Oh, for some reason I read your comment with emphasis on opening (and not writing) instead of on via the filesystem. Okay, this explains everything then. I was looking for the solution at the wrong place all the time. Thank you very much for your help, Lovell.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Globally-installed libvips is not detected on macOS ... - GitHub
I installed libvips globally with Homebrew using brew install libvips ... How do I get it detect the globally-installed version upon install ...
Read more >
Fail to install gatsby starter because of sharp - Stack Overflow
But for OP it seems he/she have installed libvips globally according the following line from the error log. info sharp Detected ...
Read more >
Installing on macOS with homebrew - libvips
Most unix-like operating systems have libvips packages, check your package manager. For macOS, there are packages in Homebrew, MacPorts and Fink.
Read more >
Changelog - High performance Node.js image processing
Ensure trim operation is a no-op when it would reduce an image to nothing. ... Ensure brew-installed vips can be detected (regression in...
Read more >
安装 - sharp
Pre-compiled libvips binaries¶. If a global installation of libvips that meets the minimum version requirement cannot be found, this module will attempt to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found