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
This worked for me on Mac (same thing the others have been posting above, just for Mac):
go to your home folder in Finder (named after your user name, in my case "macbook")
press cmd+shift+dot (will reveal hidden files)
go the .npm-global/bin
folder and copy its path (Finder menu -> View -> Show Path Bar, right click on the bin folder in the path bar -> "Copy 'bin' as Pathname")
open Terminal (by default the home folder) and go nano ~/.bash_profile
at the top of the file add export PATH="<cmd+v>:$PATH"
(will look similar to this: export PATH="/Users/macbook/.npm-global/bin:$PATH"
)
save .bash_profile changes and restart Terminal, firebase command should work now
Below command works for me on terminal
curl -sL firebase.tools | upgrade=true bash
This command install firebase tool for me
After installing:
$ npm install -g firebase-tools
$ firebase init
-bash: firebase: command not found
"If you are getting the above output then follow the below steps:"
For Windows Users:
type this cmd :
$ npm get prefix
C:\Users\Jeet\AppData\Roaming\npm [this is the location]
Now you have to set in enviorenment variable -> (windows+r) -> sysdm.cpl -> Advanced(tab) -> Environment Variables -> under the System Variables -> click on path -> edit -> C:\Users\Jeet\AppData\Roaming\npm [paste] the above location -> apply - ok - ok.
Restart your bash terminal
Thanks!!!
After trying pretty much everything, only one worked for me (I'm on MacOs Catalina):
Try the following in your terminal:
curl -sL https://firebase.tools | bash This will check the OS of your machine and then install everything else automatically and properly. The command is from the official Firebase Documentation.
https://stackoverflow.com/a/60474459/1245341
Installing firebase-tools globally did the trick for me :
npm install -g firebase-tools
I am on Linux and installing the package with admin privileges resolved the problem:
sudo npm i -g firebase-tools