'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.
Solution 1:[1]
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
Solution 2:[2]
- npm config get prefix
- 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.
- Go to path C:\Program Files\Git\usr\local\node_modules\npm
- Clikedit the system environment variable
- Click environment variable
- From the bottom system variable find the path
- click edit in the path variable
- Click new and paste the path point 3 in my case
- Finally click ok and close the command line
- Reopen the command line and type firebase --version. It will then return the version you have installed.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | nishkaush |
| Solution 2 | Md. Abu Bakkar Siddiq |
