Install sharp module manually

Install sharp module manually

  • 2020-11-6

While installing the module sharp, the process stucks...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
> fsevents@1.2.11 install /Users/lolimay/Code/Web/firenvim/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node

> dtrace-provider@0.8.8 install /Users/lolimay/Code/Web/firenvim/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js

ACTION binding_gyp_ndtp_target_build_ndtp .
TOUCH Release/obj.target/ndtp.stamp

> sharp@0.26.2 install /Users/lolimay/Code/Web/firenvim/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.0/libvips-8.10.0-darwin-x64.tar.br

We can download it (https://github.com/lovell/sharp-libvips/releases/download/v8.10.0/libvips-8.10.0-darwin-x64.tar.br) manually via the browser first.

Then, move the file to the npm cache folder.

1
mv ~/Downloads/libvips-8.10.0-darwin-x64.tar.br ~/.npm/_libvips

Rebuild it

1
npm rebuild sharp

Now, it works!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
I npm rebuild sharp

> sharp@0.26.2 install /Users/lolimay/Code/Web/firenvim/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Using cached /Users/lolimay/.npm/_libvips/libvips-8.10.0-darwin-x64.tar.br
prebuild-install WARN install tunneling socket could not be established, statusCode=500
CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
LIBTOOL-STATIC Release/nothing.a
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
CXX(target) Release/obj.target/sharp/src/metadata.o
CXX(target) Release/obj.target/sharp/src/stats.o
CXX(target) Release/obj.target/sharp/src/operations.o
CXX(target) Release/obj.target/sharp/src/pipeline.o
CXX(target) Release/obj.target/sharp/src/utilities.o
CXX(target) Release/obj.target/sharp/src/sharp.o
SOLINK_MODULE(target) Release/sharp.node
sharp@0.26.2 /Users/lolimay/Code/Web/firenvim/node_modules/sharp