watson / airplanejs

📡 ✈️ App that picks up ADS-B radio signals from airplanes and plots them in real time on a map in your browser
MIT License
682 stars 46 forks source link

AirplaneJS fails to install on Raspberry Pi via NPM #12

Closed DigiWorm0 closed 4 years ago

DigiWorm0 commented 4 years ago

When attempting to run npm i airplanejs I get the following error(s):

make: *** [rtlsdr.target.mk:109: Release/obj.target/rtlsdr/src/binding.o] Error 1
make: Leaving directory '/home/pi/PortaPi-UI/node_modules/rtl-sdr/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:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.118-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/PortaPi-UI/node_modules/rtl-sdr
gyp ERR! node -v v12.18.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN portapi-ui@1.0.0 No description
npm WARN portapi-ui@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rtl-sdr@0.1.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rtl-sdr@0.1.4 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/2020-06-16T17_53_27_221Z-debug.log

I am running on a Raspberry Pi 3 running Raspberry Pi OS 4.19 and NodeJS v12.18.0. librtlsdr is also installed via apt-get.

DigiWorm0 commented 4 years ago

A similar error appears when attempting to run npm install rtl-sdr

DigiWorm0 commented 4 years ago

Issue is resolved when downgrading to Node v10.21.0 as opposed to v12.18.0.