Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Hosting set up issue

I'm just trying to do a simple set-up for hosting on firebase. I'm following the instructions at (https://www.firebase.com/docs/hosting/guide/deploying.html) but I'm missing something because I keep getting an error of:

'firebase' is not recognized as an internal or external command, operable program, or batch file."

What I've done:

  1. Installed nodejs.
  2. Set PATH = to C:\Program Files\nodejs; via control Panel
  3. in cmd: cd C:\Program Files\nodejs
  4. npm install -g firebase-tools
  5. changed directory to folder with my html files
  6. tried running both firebase app init and firebase init neither of which work and give me the same error

screenshot of cmd

like image 415
Alexsandra Guerra Avatar asked Apr 09 '15 06:04

Alexsandra Guerra


3 Answers

The easiest way is to run

npm install -g firebase-tools .

Thank me later .

like image 60
Md omer arafat Avatar answered Oct 30 '22 09:10

Md omer arafat


I had this exact same error. I fixed it by changing the path variable to include firebase.

Try finding firebase.cmd on Windows through C:\Users\myname\AppData\Roaming\npm. I couldn't find firebase.exe, which is where I got confused. Looking at your screenshot, I can see where the path is saved.

Just search for the firebase.cmd and add it to your %PATH% C:\Users\myname\AppData\Roaming\npm. Then restart and try again: firebase should be a valid command

Sorry this is a year late and hope this helps someone.

like image 40
Script Kitty Avatar answered Oct 30 '22 11:10

Script Kitty


All of the Simple and Quick solution is here...

step1: just go to C:\Users\your-user-name\AppData\Roaming\npm
step2: copy the path of this "npm"-folder
step3: now go to start and type "env" and select first-option then
step4: now paste that path in "paths"-option by clicking on "edit"-button
step5: then click on "ok" and restart your pc

like image 33
Ajay jangid Avatar answered Oct 30 '22 10:10

Ajay jangid