Search code examples
node.jsfirebasegoogle-cloud-firestoreelectronraspbian

Firestore snapshot fails in Raspbian OS


My code runs MacOS, Windows 10 and Ubuntu. However when I run it on Raspbian, I get the error

Encountered error: Error: @grpc/grpc-js only works on Node ^8.13.0 || >=10.10.0
(node:18099) ExperimentalWarning: The http2 module is an experimental API.

my versions are:

pi@raspberrypi:~ $ node -v
v13.1.0
pi@raspberrypi:~ $ npm -v
6.12.1

The problem occurs when I set the snapshot for a firebase focument. Thank you guys in advance...


Solution

  • If you trying to run an electron js based app on device which has cpu with arm architecture you have to use either electron@3.0.13 or electron@5.0.0 . In addition, if are you going to use another library which uses grpc , use electron@5.0.0 . Otherwise you will drown in errors. Just delete the version of electron in packege.json file. Make that line as electron: "5.0.0" and delete node_modules with package-lock.json file. After npm install you are good to go.