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.

fatal error: 'vips/vips8' file not found

See original GitHub issue

I’m having problems installing sharp in a clean node:12 container.

docker run --rm -it node:12 npm i sharp

> sharp@0.23.0 install /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.8.1/libvips-8.8.1-linux-x64.tar.gz
prebuild-install WARN install libvips-cpp.so.42: cannot open shared object file: No such file or directory
make: Entering directory '/node_modules/sharp/build'
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
../src/common.cc:25:22: fatal error: vips/vips8: No such file or directory
 #include <vips/vips8>
                      ^
compilation terminated.
sharp.target.mk:135: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: *** [Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory '/node_modules/sharp/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack     at ChildProcess.emit (events.js:209:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 5.0.0-29-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /node_modules/sharp
gyp ERR! node -v v12.10.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.23.0 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sharp@0.23.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-09-23T18_08_09_973Z-debug.log

The issue is quite unfamiliar to me and i havent find the cause yet. Im posting early hoping somebody can point me in the right direction.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:32
  • Comments:41 (5 by maintainers)

github_iconTop GitHub Comments

112reactions
lovellcommented, Sep 23, 2019

It looks like commit https://github.com/isaacs/minipass/commit/40e1d612d3d58e415362b1ebb97df8b69da5374f might have collided with https://github.com/mafintosh/end-of-stream/issues/11 and/or commit https://github.com/isaacs/minipass/commit/69888ebfbced926a9da61f044fdd733810a874d2 might have collided with https://github.com/npm/node-tar/commit/42fe53b413527983f2509ae606412ee1e93761d7

This will affect most modules that (transitively) depend on minipass, tar and/or end-of-stream.

Pinning minipass to v2.7.0 should workaround this for now.

For those using yarn, you can add the following to your package.json:

  "resolutions": {
    "minipass": "2.7.0"
  },
26reactions
lovellcommented, Sep 23, 2019

Whatever is causing this problem, it looks like it’s affecting pretty much every native node module that provides prebuilt binaries

https://github.com/mapbox/node-pre-gyp/issues/477 https://github.com/mapbox/node-sqlite3/issues/1222

@imkane This issue is not closed, I am actively working on investigating it right now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

vips/vips8 file not found #include <vips/vips8> in Ionic cordova ...
I very recently ran into a similar issue after making some changes to a project's package.json on my Mac (not an Angular or...
Read more >
Resolving 'fatal error: 'vips/vips8' file not found' on macOS
I was having problems installing dependencies to a not too old frontend project using yarn. The installation failed with a long traceback ...
Read more >
Unsolved 1.19.5 - vips/vips8 problem - NodeBB
Since v1.19.4 I have the following problem. npm ERR! code 1 npm ERR! path /home/user_radforum/nodebb/node_modules/sharp npm ERR! command ...
Read more >
Gatsby Build Error When Building Sharp on Apple M1 with ...
Gatsby will throw a build error related to the sharp library when you try to ... src/common.cc:24:10: fatal error: 'vips/vips8' file not found#include ......
Read more >
fatal error vips vips8 file not found 完美解决方法 - CSDN博客
。这个库本身使用了C编写的libvips图像处理库,处理速度比gm快4、5倍,且其通过C++ addons方式整合进node中,调用消耗可以忽略不计。
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