Sijan
Sijan

Reputation: 15

zsh: command not found: firebase

So I was following a tutorial on a todo app with react and firebase. And when it was time to deploy the app, firebase init was to be written on the terminal. I tried this on both the vscode terminal and on my mac but it says firebase not found. I had even installed firebase.

Upvotes: 1

Views: 6345

Answers (3)

Maher Ahmad EL-Amary
Maher Ahmad EL-Amary

Reputation: 196

curl -sL firebase.tools | upgrade=true bash

run this commmand in your terminal to init firebase to your mac machine

Upvotes: 1

Md. Abu Bakkar Siddiq
Md. Abu Bakkar Siddiq

Reputation: 187

  1. npm config get prefix
  2. In my case it returns a path C:\Program Files\Git\usr\local. In your case, it may be return different path. Then go to the path and find node_modules -> npm and then copy the path.
  3. Go to path C:\Program Files\Git\usr\local\node_modules\npm
  4. Clikedit the system environment variable
  5. Click environment variable
  6. From the bottom system variable find the path
  7. click edit in the path variable
  8. Click new and paste the path point 3 in my case
  9. Finally click ok and close the command line
  10. Reopen the command line and type firebase --version. It will then return the version you have installed.

Upvotes: 0

nishkaush
nishkaush

Reputation: 1548

I feel you installed firebase locally in your project as a dependency (which is great!)

However, to deploy the app, you need to install firebase CLI as well.

Here is a link on how to install firebase-cli first - https://firebase.google.com/docs/cli#install-cli-mac-linux

And then here is an article on how to deploy with firebase - https://firebase.google.com/docs/hosting/quickstart

Upvotes: 5

Related Questions