Global libvips version does not get detected
See original GitHub issueI 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:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Did you see my comment above?
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.