sttm-desktop icon indicating copy to clipboard operation
sttm-desktop copied to clipboard

npm install given compile error on raspberry pi

Open mpsdhingra opened this issue 7 years ago • 6 comments
trafficstars

Hi, I am trying to run the app on raspberrypi 3. I have install node version 10 (lastest) and am running npm install. I get the following errors following the command. Can someone help find the root cause?

npm install

[email protected] install /home/pi/sttm-desktop/node_modules/mdns node-gyp rebuild

make: Entering directory '/home/pi/sttm-desktop/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:159: 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/sttm-desktop/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:262:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12) gyp ERR! System Linux 4.14.52-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/sttm-desktop/node_modules/mdns gyp ERR! node -v v10.9.0 gyp ERR! node-gyp -v v3.7.0 gyp ERR! not ok npm WARN [email protected] license should be a valid SPDX license expression npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/7zip-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/app-builder-bin-mac): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/7zip-bin-mac): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/electron-builder-util/node_modules/7zip-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/dmg-builder/node_modules/app-builder-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/dmg-builder/node_modules/app-builder-bin-mac): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/app-builder-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"arm"})

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. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

mpsdhingra avatar Aug 18 '18 22:08 mpsdhingra

@mpsdhingra Jee, this is happening because avahi is required. Please see this thread to get it working on Raspberry Pi. https://github.com/agnat/node_mdns/issues/60

navdeepsinghkhalsa avatar Aug 18 '18 22:08 navdeepsinghkhalsa

Thanks @navdeepsinghkhalsa Ji! Got past the above error. Now getting issue with sqlite3 installation. also it tries to install node-saas linux-arm edition which is not available on download page of node-sass website. For sqlite, its trying to access an aws location that doesn't seem to be publicly accessible. Any pointers?

husky setting up hooks done

[email protected] install /home/pi/sttm-desktop/node_modules/node-sass node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.3/linux-arm-64_binding.node Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.3/linux-arm-64_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g.

  export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

  npm config set proxy http://example.com:8080

[email protected] install /home/pi/sttm-desktop/node_modules/sqlite3 node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v64-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp) node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v64-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp) make: Entering directory '/home/pi/sttm-desktop/node_modules/sqlite3/build' ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c make: Entering directory '/home/pi/sttm-desktop/node_modules/sqlite3/build' ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c TOUCH Release/obj.target/deps/action_before_build.stamp TOUCH Release/obj.target/deps/action_before_build.stamp CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o rm: cannot remove './Release/.deps/Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o.d.raw': No such file or directory deps/sqlite3.target.mk:127: recipe for target 'Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o' failed make: *** [Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o] Error 1 make: Leaving directory '/home/pi/sttm-desktop/node_modules/sqlite3/build' AR(target) Release/obj.target/deps/sqlite3.a COPY Release/sqlite3.a CXX(target) Release/obj.target/node_sqlite3/src/database.o 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:262:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12) gyp ERR! System Linux 4.14.62-v7+ gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/sttm-desktop/node_modules/sqlite3/lib/binding/node-v64-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/pi/sttm-desktop/node_modules/sqlite3/lib/binding/node-v64-linux-arm" gyp ERR! cwd /home/pi/sttm-desktop/node_modules/sqlite3 gyp ERR! node -v v10.9.0 gyp ERR! node-gyp -v v3.7.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/sttm-desktop/node_modules/sqlite3/lib/binding/node-v64-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/pi/sttm-desktop/node_modules/sqlite3/lib/binding/node-v64-linux-arm' (1) node-pre-gyp ERR! stack at ChildProcess. (/home/pi/sttm-desktop/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5) node-pre-gyp ERR! System Linux 4.14.62-v7+ node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/sttm-desktop/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /home/pi/sttm-desktop/node_modules/sqlite3 node-pre-gyp ERR! node -v v10.9.0 node-pre-gyp ERR! node-pre-gyp -v v0.6.38 node-pre-gyp ERR! not ok Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/sttm-desktop/node_modules/sqlite3/lib/binding/node-v64-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/pi/sttm-desktop/node_modules/sqlite3/lib/binding/node-v64-linux-arm' (1) ... some lines of warnings... node_sqlite3.target.mk:119: recipe for target 'Release/obj.target/node_sqlite3/src/database.o' failed make: *** [Release/obj.target/node_sqlite3/src/database.o] Error 1 make: Leaving directory '/home/pi/sttm-desktop/node_modules/sqlite3/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:262:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12) gyp ERR! System Linux 4.14.62-v7+ gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/sttm-desktop/node_modules/sqlite3/lib/binding/node-v64-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/pi/sttm-desktop/node_modules/sqlite3/lib/binding/node-v64-linux-arm" gyp ERR! cwd /home/pi/sttm-desktop/node_modules/sqlite3 gyp ERR! node -v v10.9.0 gyp ERR! node-gyp -v v3.7.0 gyp ERR! not ok npm WARN [email protected] license should be a valid SPDX license expression npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/7zip-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/app-builder-bin-mac): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/7zip-bin-mac): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/electron-builder-util/node_modules/7zip-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/dmg-builder/node_modules/app-builder-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/dmg-builder/node_modules/app-builder-bin-mac): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/app-builder-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

mpsdhingra avatar Aug 19 '18 03:08 mpsdhingra

@SikhNerd - thoughts here?

tarunsingh5 avatar Jun 17 '20 04:06 tarunsingh5

this bug is quite old but if we are able to run it on rpi now we can close this out

tarunsingh5 avatar Jun 17 '20 04:06 tarunsingh5

rpi builds will fail until we move to the very latest realm https://github.com/realm/realm-js/issues/2230

SikhNerd avatar Aug 04 '20 15:08 SikhNerd

@lbk003 @tsingh777 we'll need to fix this in order to have the build work on rpi.

prebhdevsingh avatar Mar 15 '21 18:03 prebhdevsingh