How to fix “firebase: command not found” error

Firebase: command not found error

In this post, we share with you how to install the firebase cli package to resolve the “firebase: command not found” error, along with the reason why we get this kind of error. Join us in this article to get more detailed information.

Why do we run into this problem?

The reason why you get the error message: “firebase: command not found” is because you don’t have package firebase cli installed. The above message means that the system cannot find the firebase command on your computer. To fix this problem, make sure you have installed the firebase cli package.

The solutions for the firebase: command not found error

The fastest way to fix this problem is to install the firebase cli package globally. To do that, open the terminal and run the command below:

npm install -g firebase-tools

Once the installation is complete, you can check the version you have just installed of the package with the following command:

firebase --version



In case you need more help, use the commands below:

::show a list of available commands
firebase --help

::give instructions for a specific command
firebase <command> --help

For installation, sometimes you also need to use administrator/superuser privileges. Don’t forget to restart the terminal before continuing to make sure to update with the latest changes.

If you perform the installation exactly as instructed above and the error still persists, run this command:

npm config get prefix



After executing this command, you receive a string which is the path to where ‘npm‘ locates all the global packages you have installed. You can then find those packages in the bin folder.

At this point, you need to check the PATH environment variable. If it doesn’t already have the same value as you got from the statement ‘npm config get prefix‘, then add that value for the PATH environment variable.

Note: If this approach also does not help, you must uninstall NodeJS from your computer and reinstall it. Then execute the command ‘npm install -g firebase-tools‘ to install the firebase cli package globally.


In conclusion, you must install the firebase cli package globally before using it in order not to avoid getting the firebase: command not found error. If you have problems with the installation, try following the same Path environment variable check steps we mentioned above. That’s the end of this post. We hope the above information is helpful to you.

You can read more other articles here, thanks for reading!

Maybe you are interested:

Leave a Reply

Your email address will not be published. Required fields are marked *