I get the following when I try to install, I’ve seen different tips to try to work around errors but can’t figure out what this one is…
pi@raspberrypi:~/dasher $ sudo npm install
\
> [email protected] install /home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.4.4"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher/.node-gyp"
make: Entering directory '/home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher/build'
CXX(target) Release/obj.target/socketwatcher/socket_watcher.o
SOLINK_MODULE(target) Release/obj.target/socketwatcher.node
COPY Release/socketwatcher.node
make: Leaving directory '/home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/node_modules/socketwatcher/build'
> [email protected] install /home/pi/dasher/node_modules/node-dash-button/node_modules/pcap
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.4.4"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/.node-gyp"
make: Entering directory '/home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/build'
CXX(target) Release/obj.target/pcap_binding/pcap_binding.o
../pcap_binding.cc:2:23: fatal error: pcap/pcap.h: No such file or directory
#include <pcap/pcap.h>
^
compilation terminated.
pcap_binding.target.mk:89: recipe for target 'Release/obj.target/pcap_binding/pcap_binding.o' failed
make: *** [Release/obj.target/pcap_binding/pcap_binding.o] Error 1
make: Leaving directory '/home/pi/dasher/node_modules/node-dash-button/node_modules/pcap/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:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.50-v7+
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 /home/pi/dasher/node_modules/node-dash-button/node_modules/pcap
gyp ERR! node -v v4.4.4
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 4.4.50-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE
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! This is most likely a problem with the pcap 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 pcap
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls pcap
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/dasher/npm-debug.log