I am using ubuntu 18.04.4 LTS
I was trying to learn admin sdk tutorials from google codelab, and was trying to setup the defined project in this
While setting up, the following command gives an error.
npm -g install firebase-tools
and error: "No firebase command found" on command firebase --version
I have tried setting npm settings globally as described here, but nothing works.
Can anyone help me with this, as I am new to firebase admin SDK.
Shouldn't you first install firebase itself?
npm i -g firebase
I'm using Mac OS 10.15.2, Terminal 2.10.
I'm trying to install firebase tools to allow me to upload my experiment to firebase.
The following is what I used to do, which had been giving me success. But today, I'm using a new computer, and the installations were unsuccessful. I'm pasting the record in command line, as a screenshot, here for your reference
.
Thank you very much!
You are using the wrong package. You should be using "firebase-tools" instead of "firebase-cli". Be sure to read through the warnings and errors carefully.
Uninstall the old firebase-cli package:
sudo npm uninstall -g firebase-cli
Then install the correct firebase-tools package:
sudo npm install -g firebase-tools
Try running the command with sudo i.e use the command
sudo npm install -g firebase-tools
I've been looking fo the exact same question but i couldnt find it. Could someone tell me what is wrong with this?
Firebase deploy error command
this worked for me
firstly i ran sudo npm install npm -g
secondly npm install in the functions folder
I am trying to (re)install Firebase, however, when I run sudo npm install -g firebase-tools the following error shows up:
I have no idea what is wrong, it used to work well a few month ago.
You try running
npm cache clean
and then trying to install again.
If the error is not lost try below
Have you tried installing homebridge with the --unsafe-perm option?
sudo npm install -g --unsafe-perm homebridge
If npm detects it is running as root it drops to a non-privileged user which then doesn't have permissions to write to /root/.node-gyp. The --unsafe-perm option stops it from changing user.
nvm doesn't have this problem when not using sudo because it stores everything under the current users' home directory.
i am windows user and trying to update firebase version using
npm install -g firebase-tools but when i run firebase --version
it shows the same version.
I also run npm uninstall firebase --save and check firebase --version it shows same.
what should i do to update my firebase version?
npm update -g firebase-tools
or
npm install -g firebase-tools#3.12.0 to install a specific version
And make sure to restart your terminal/IDE otherwise, it won't take effect.
Have you tried npm update -g firebase-tools? This worked for me.
These days if you're on an older version, and you check the version of firebase-tools, by running:
firebase -V
along with the version of firebase-tools that you're on, it also gives you a messages, something like this:
So you can basically run npm i -g firebase-tools to update the version of your firebase-tools installation to the latest version.
Hope this helps :)
For other like me stumbling in with a weird version mismatch:
When I did firebase -V in my terminal I would get a different version (5.1.1) than when I ran firebase through a npm run script (3.19.3)
The problem was that I had previously installed firebase locally into that project. In other words, I was getting the global version in the terminal, but npm was using the node_modules version
To confirm this, I added a simple test called test-foo to my package.json (firebase -V && which firebase) and ran it:
kuzyn(λ)matebox‡ npm run test-foo
kuzyn-project#1.1.0 test-foo /home/kuzyn/code/kuzyn-project/firebase
firebase -V && which firebase
3.19.3
/home/kuzyn/code/kuzyn-project/firebase/node_modules/.bin/firebase
Then I removed the (uneeded in my case) local firebase package from the package.json and from node_modules
Try the 2 steps bellow
1. yarn/npm cache clean
2. npm install -g firebase firebase-tools or yarn add -g firebase firebase-tools
in a new terminal, firebse --version
works for me
it works to me...
standalone binary: Download the new version, then replace it on your system
if you are using the standalone.Download the new version
In my case I was using an old node version (v10) and had to switch to a newer one (v12). After that I ran npm install -g firebase-tools again and it was updated to the latest version.
You can check the current node version by running node -v. And I use nvm to switch to a different node version.
That might happen in case you've installed the firebase-cli using a so called automatic install script.
Try to call curl -sL https://firebase.tools | upgrade=true bash as described in the official documentation