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 Error/Warning
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: