firebase-tools "-bash: firebase: command not found"

@mklement0 That answer looks good, but I'm worried it will be intimidating to someone who is so new to the command line. So I'm going to cherry-pick the most relevant piece of it.

@cienki Run this command to see what you should be putting in that PATH prefix in your .bash_profile file:

npm get prefix

You should add the npm bin folder to your bash PATH variable. To do that, run:

npm get prefix

And it should output something like /home/your-username/npm-global or /home/your-username/npm-packages.

Then in your ~/.bashrc or ~/.bash_profile (if you're in a Mac) file, add:

export PATH="/home/your-username/npm-global/bin:$PATH" # Add npm bin PATH

Note the "/bin" after the npm get prefix result.


Run code below with terminal,

alias firebase="`npm config get prefix`/bin/firebase"

Installing firebase-tools globally did the trick for me :

npm install -g firebase-tools

Tags:

Bash

Firebase