firebase-tools install throws 'root does not have permission' error repeatedly | MyThinkPond

During installtion of firebase-tools, you see a repeated output about ‘root does not have permission’ error. This is one way to fix that issue.

sudo npm install -g firebase-tools


gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/.node-gyp/8.9.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/.node-gyp"

Here is what I did to avoid this:

sudo mkdir -p /usr/local/lib/node_modules/firebase-tools/node_modules/grpc/.node-gyp/8.9.1/

This creates an empty directory with the path specified then rerun the following:

$ sudo npm install -g firebase-tools
Password: ###YOUR_PASSWORD_HERE###
/usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/bin/firebase
+ firebase-tools@3.15.3
updated 1 package in 11.755s

I hope this helps.


If you find this article useful, consider signing up for my email or repost this on your favorite social site. See links on the right navigation.

Now for Today’s Inspiration

No work is stressful. It is your inability to manage your body, mind, and emotions that makes it stressful.
Venkatt Guhesan avatar
About Venkatt Guhesan
Enterprise Software Architect currently working at DataDirect Networks developing a highly scalable monitoring solution called DDN Insight. My passions include all things Open Source including Linux (CentOS, Red Hat, Gentoo, Open Stack, Docker & Ubuntu), embedded ARM processors and microcontrollers (Arduino, UDOO, Cubieboard, BeagleBoard, OnionIO, TI's Zigbee). Coming from an Electrical and Computer Engineering background, working in developing and designing enterprise - distributed, highly scalable software requires a unique set of software skills with a good understanding of the hardware. This makes his work challenging and interesting. In his free time, he spends his time with his family and two children. He also enjoys researching on topics including - world ancient history and yoga. Visit the 'About' section for more details.
comments powered by Disqus