score:7

Accepted answer

i will recommend that instead of installing node latest version (which might not be well supported by all libraries) try to use the v8.11 stable version.

then there are couple of actions/trick to handle this thing:

  1. you might be using windows 10, so try to disable your antivirus and then try again. if on linux try to use command sudo in start.
  2. check this as well: unable to install firebase tools cli using windows 10
  3. and this: error with npm install - a pre-gyp error

additional information in reference to learning firebase these might help you as well:

https://medium.com/quick-code/how-to-integrate-react-redux-and-firebase-in-3-simple-steps-c44804a6af38

https://www.codementor.io/yurio/all-you-need-is-react-firebase-4v7g9p4kf

score:0

i don't know if this is relevant, but i was also getting similar errors. i was trying to do install the firebase using expo (as recommended in the docs)

expo install firebase

and this was failing for me. i noticed that the issue was related to my package-lock.json where node-pre-gyp was getting added. wasted some time, but finally the issue was resolved when i did a npm install (and not expo install) hope this helps people in the future.

npm install firebase --save

score:1

i needed to downgrade node from 10.12 to 8.11

node -v

v10.12.0

npm install -g n
n 8.11.1
mode -v

v8.11.1


Related Query

More Query from same tag