i am try to use firebase-cloud-messaging
with javascipt
and i use this repo : https://github.com/firebase/quickstart-js/tree/master/messaging
in the Get Started i must run this command npm install -g firebase-tools
. but i got error like this :
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! protobufjs@6.11.2 postinstall: `node scripts/postinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protobufjs@6.11.2 postinstall 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! /root/.npm/_logs/2021-10-28T09_18_46_217Z-debug.log
can anyone help and explain to me what's wrong it this, i have try any solution in google but still error like this. Thanks
Version node : v14.18.1
Version npm : 6.14.15
OS : Linux Elementary 6
CodePudding user response:
Try to run this:
sudo npm install --unsafe-perm -g firebase-tools
More about the --unsafe-perm
can be read here