Excited that Firebase\'s hosting is now out of beta. Trying to get going with with the firebase-tools package and I\'ve successfully installed it:
npm instal
Using Windows 10, Bash
This worked for me:
npm get prefix
// to find Path which for me it was C:\Users\User\AppData\Roaming\npmfirebase --version
//to check firebase version
For anyone using nvm
the error could arise because you are on a different nvm version than you were on when you first installed firebase tools globally. That's what it was for me. When I restarted webstorm nvm switched to a different version.
Run nvm list
to check the version you are on and run nvm use x.x.x
to switch to the right version where you installed firebase tools originally.
if you installing firebase-tools using
yarn global add firebase-tools
i got same error then i got answer and execute this
export PATH="$(yarn global bin):$PATH"
and then i can do firebase login
pretty well
For anyone using MacOS Catalina 10.15.2 getting the bash PATH variable fixed the issue for me.
Run:
npm get prefix
Then run:
export PATH=/Users/userid/.npm-global/bin:$PATH
Note: I recently upgraded from my old High Sierra MacBook Pro, and was confused as well.
@mklement0 That answer looks good, but I'm worried it will be intimidating to someone who is so new to the command line. So I'm going to cherry-pick the most relevant piece of it.
@cienki Run this command to see what you should be putting in that PATH
prefix in your .bash_profile
file:
npm get prefix
Adding to Durul Dalkanat's answer,
Assuming you have executed npm install firebase-tools -g
npm get prefix
.alias <output of npm get prefix>/bin/firebase
at the end of the file.source .bashrc
in the home directory.Enjoy!
The alias of firebase will be the actual firebase path in the main system and this solution should work flawlessly.