Raspberry Pi npm install failure
Closed this issue · 5 comments
This seems similar to Issue 195, but is on a different OS.
I am running Raspbian GNU/Linux 8 (jessie), which is a flavor of Debian for Raspberry Pi.
When running "npm install mdns" I recieve the below build error:
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
See the attached log for more details:
2017-08-14T18_17_05_277Z-debug.txt
Noticed that the log and the debug.log do not show the "same" contents. Here is the full error from execution:
pi@raspberrypi:~/nodejs/mdns $ npm install mdns
mdns@2.3.3 install /home/pi/nodejs/mdns/node_modules/mdns
node-gyp rebuild
make: Entering directory '/home/pi/nodejs/mdns/node_modules/mdns/build'
CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o
In file included from ../src/dns_sd.cpp:1:0:
../src/mdns.hpp:32:20: fatal error: dns_sd.h: No such file or directory
#include <dns_sd.h>
^
compilation terminated.
dns_sd_bindings.target.mk:150: recipe for target 'Release/obj.target/dns_sd_bindings/src/dns_sd.o' failed
make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 1
make: Leaving directory '/home/pi/nodejs/mdns/node_modules/mdns/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.9.35-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/nodejs/mdns/node_modules/mdns
gyp ERR! node -v v8.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/nodejs/mdns/package.json'
npm WARN mdns No description
npm WARN mdns No repository field.
npm WARN mdns No README data
npm WARN mdns No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mdns@2.3.3 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mdns@2.3.3 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! /home/pi/.npm/_logs/2017-08-14T19_07_41_682Z-debug.log
Found the issue.
Based on Stack Overflow's error: dns_sd.h: No such file or directory I needed to install the below packages.
sudo apt-get install libavahi-compat-libdnssd-dev
No cigar. Mine failed with same error, later ubuntu version. Had already installed libavahi-compat-libdnssd-dev
Guys.. I am facing the same issue
I am trying to push a node js application into Heroku. I am facing the below error "
n file included from ../src/dns_sd.cpp:1:0:
../src/mdns.hpp:32:20: fatal error: dns_sd.h: No such file or directory
#include <dns_sd.h>
^
compilation terminated.
make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 1
make: Leaving directory /tmp/app/node_modules/mdns/build' gyp ERR! build error gyp ERR! stack Error:
make` failed with exit code: 2
I have made changes already like adding the dependencies libavahi-compat-libdnssd-dev but still facing the error. Can you please suggest what would be the possible reason?
Where do I find that dns_sd.h
on Windows?