Sharp: Node v7.7.0: fatal error: tracing/trace_event.h: No such file or directory

Created on 4 Apr 2017  路  4Comments  路  Source: lovell/sharp

I am trying to install sharp (npm i --save sharp) and I found this error.

In file included from ../src/common.cc:20:0:
/home/apps/.node-gyp/7.7.0/include/node/node.h:44:33: fatal error: tracing/trace_event.h: No such file or directory
compilation terminated.
sharp.target.mk:118: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: *** [Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory '/var/apps/api/dev/node_modules/sharp/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/apps/.nvm/versions/node/v7.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-66-generic
gyp ERR! command "/home/apps/.nvm/versions/node/v7.7.0/bin/node" "/home/apps/.nvm/versions/node/v7.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/apps/api/dev/node_modules/sharp
gyp ERR! node -v v7.7.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sharp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sharp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sharp
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/apps/.npm/_logs/2017-04-04T14_14_05_180Z-debug.log

My machine is running on this Ubuntu Release

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:    16.04
Codename:   xenial
question

Most helpful comment

Hello, the short-lived Node version 7.7.0 was a bit broken - see https://github.com/nodejs/node/issues/11628 for the background.

All 4 comments

Hello, the short-lived Node version 7.7.0 was a bit broken - see https://github.com/nodejs/node/issues/11628 for the background.

Same issue with NodeJS v6.10.3 . CentOS 6

@ickata For Centos 6, please see http://sharp.dimens.io/en/stable/install/#linux

For 32-bit Intel CPUs and older Linux-based operating systems such as Centos 6, it is recommended to install a system-wide installation of libvips from source: https://github.com/jcupitt/libvips#building-libvips-from-a-source-tarball

Hi @lovell ,

Thank you for the quick response. I followed the installation instructions but now I get different error. Therefore I started new thread. #811

Was this page helpful?
0 / 5 - 0 ratings