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
Related
I have a problem with npm.
npm install -g firebase-tools
After firebase login, I get "command not found" error. I uninstalled node js and reinstalled it still the same problem. I would be glad if you help.
firebase login
-bash: firebase: command not found
I have Cloud functions project and i moved the project from my old laptop to my new laptop.
I have installed everything that necessary. My problem is when i try firebase deploy it gives me that error:
! functions: package.json indicates an outdated version of firebase-functions.
Please upgrade using npm install --save firebase-functions#latest in your functions directory.
I did that i have been told, but still it gives me the same error.
What should i do? And how i direct the npm install to my functions directory?
You need to run sudo npm install --save firebase-functions#latest in your functions directory. Cannot be in any other directory.
In Flutter this will be in
/path_to_your_flutter_project/functions
Hope this helped someone
I had the same problem.
You just need to run npm install -g firebase-tools
npm install -g firebase-tools
/usr/local/bin/firebase -> /usr/local/lib/node_modules/firebase-tools/lib/bin/firebase.js
+ firebase-tools#7.0.0
That fixed my problem.
Update firebase-admin and make sure your root package.json file points to your functions folder
I cannot, as the title suggests, upgrade or in any way remove the current version of firebase off my system and I don't understand why. I installed it using the firebase commands prompted when you first start a project, something in line with npm install -g firebase-tools. After I've installed other packages to go along with it and I've upgraded the packages accordingly.
Now I want to remove the package I just do not understand how to do it. I've run
npm uninstall -g firebase-tools
npm uninstall -g firebase-admin
npm uninstall -g firebase-functions
npm uninstall -g firebase*
...and many other variations. After a while of trying I just figured I'll check what packages may still be left.
npm ls | grep firebase
Shows no firebase packages are still installed, however, running any firebase command will still work perfectly. Running firebase --version I get 3.15.4. I've also, just as a Hail Mary, tried running apt remove --purge firebase*
Further digging I figured that maybe the npm ls command was off, so I tried reinstalling all firebase packages. I ran it again and there they were, however* firebase was now at version 4.12.1. Running firebase --version still produce 3.15.4.
I'm really lost at this point. All help articles relating to uninstalling firebase leads to either how to delete projects or databases or to npm's how to uninstall a package website.
Sincerely.
You can't delete it, because you need to remove entire folder. This worked for me when I ran into the same problem:
which firebase
This locates the folder where firebase is (in Mac case it's /usr/local/bin/firebase) and then you do:
rm /usr/local/bin/firebase
Now do firebase -V and you'll get Command firebase not found. And now you can install back firebase with the real latest actual version:
npm i -g firebase-tools#latest
However, if you run firebase it will still give you Command firebase not found for what you can do this:
alias firebase="`npm config get prefix`/bin/firebase"
Worked for me with almost exactly the same problem.
Hope this helps you too!
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.
Been trying to install Grunt on my laptop to try it out, I already had Node, so installed the Grunt cli which went ok and then ran the command npm init to create the package.json file, followed the necessary steps and also went well, however when I get to the point of installing dependencies, I get an error.
For instance am trying to install Grunt as a dependency, with the following command:
npm install grunt --save-dev
After running this command I get the following error:
No README.md file found
If anyone knows what I am meant to do please let me know.