I am trying to use firebase hosting. I have put in the console: npm install -g firebase-tools
. Now I put firebase login
in and the console tells me:
"firebase" is not recognized as an internal or external command, program or executable batch file.
How do I fix this so that the console recognizes the term "firebase" for me?
This was what worked for me on Windows 10.
First of all you write the command
and copy the entire route that it returns, which in my case was:
after that follow this path:
control panel > system > advanced system settings > environment variables.
Select the one that says PATH and click on Edit, then click on New and paste the path that you previously copied. You click OK on all windows to close them. Finally restart your pc (or just the terminal, I restarted the pc) and once restarted you write the command:
it has to show you the version of firebase which in my case is 6.0.0
Once this is done you can run the command "firebase init" or "firebase login" from your project folder.
You must install
firebase-tools
https://firebase.google.com/docs/cli#mac-linux-npm