Excited that Firebase\'s hosting is now out of beta. Trying to get going with with the firebase-tools package and I\'ve successfully installed it:
npm instal
For Mac OS Sierra:
$ sudo npm install -g firebase-tools
$ ps aux | grep node
$ npm install -g @google-cloud/functions-emulator
$ firebase --version
Faced the same issue, am a newbie backend guy.
Used npm install firebase-tools
It doesn't install and you can't run.
I tried looking at the forums and here's what worked for me:
sudo npm install -g firebase-tools
.
Then it asks for Permissions when you firebase login
.
Am using Ubuntu.
Run code below with terminal,
alias firebase="`npm config get prefix`/bin/firebase"
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
.
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.
Simply reinstall node.js
. This worked for me and fire command was recognized.
Bruno's answer did the trick, I only needed to add a dot at npm-global in Ubuntu in .bashrc:
export PATH="/home/your-username/.npm-global/bin:$PATH" # Add npm bin PATH