firebase-tools: Firebase command not found

Hey!

I’m new to Firebase, and tried to deploy my app. but I always get this error : -bash: firebase: command not found I tried installing with npm install -g firebase-tools a

aswel as npm install --global firebase-tools

and their corresponding sudocommand.

Any ideas on how to fix this?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 5
  • Comments: 29

Most upvoted comments

Run code below with terminal,

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

@durul This saved my life after about 40 ridiculous minutes - Worked like a charm!

Solution

npm install -g firebase-tools
firebase login

https://firebase.google.com/docs/cli#mac-linux-npm

Run code below with terminal,

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

YES! This worked for me.

If you are using linux : use: alias firebase=“npm config get prefix/bin/firebase”; to solve it , It helped me.

A mi me paso lo mismo, en Windows de recomendacion instalen git y usen la consola de git o enlacenla a su editor yo uso vs code para usar la consola de git el problema es que 1) tenes que loguearte con Google 2) importar los archivos que te da firebase en tu tu proyecto. 3) haber instalado npm, 4) npm install -g firebase-tools 5) PONER EN LA CONSOLA ls para que quede a mismo nivel, de las carpetas src y dist o public 6) firebase login 7) firebase init y listo ya estan en el proyecto.

@durul still saving lives ❤️

Thank you, worked like a charm!

For windows try to install it without -g .//because it will store modules some where in C drive where you will never found it again. try npm -i --save firebase-tools

you will found .bin in node_modules of current directory ‘./node_modules/.bin’ try to copy full path of ./bin folder and run cmd and type : set path=copied_path now type: firbase now it will workes .you have to run (set path=full path of .bin folder) every time when you open terminal.

Below command works for me on terminal

curl -sL firebase.tools | upgrade=true bash

This command install firebase tool for me

I tried everything you wrote here, yet i am still getting the same result //bash: C:UsersMikeAppDataRoamingnpm/bin/firebase: No such file or directory

same problem here . do you have some idea about this matter? why doesn’t work on windows

@durul

Great! Thanks, man.

Another issue is you need to login to your computer as a Root/Administrator. I utilized this solution under my personal account and the code referenced above worked, however, it was pointed out to me that I was not under a root/administrator account.

Could you check up to install ‘nodejs’ in ubuntu?

check up command : node -v

if u don’t show node version in windows, follow commend!

sudo apt-get install nodejs-legacy

after, it will be okay!