What is the meaning of this error (protobufjs@6.11.2 postinstall: `node scripts/postinstall`)?

Viewed 1185

Hi i was installing firebase on the ubuntu console with npm install --save firebase and got this error below in the installation process, I tried to install npm install protobufjs@6.11.2 to try to get rid of the error but it did not work. What is the meaning of the error?

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.
2 Answers

npm attempts not to run the protobuff postinstall script as root and when you are trying to run it as a root using "sudo" command npm will try to prevent it. So you need to use --unsafe-perm flag while installing. So the full command will look like sudo npm install --unsafe-perm -g firebase

I am not sure why this error occurs but my understanding is that it is related to some sort of permission issue.

You can solve this error by prefix Sudo

sudo npm install --save firebas

Related