Trying to rollback Firebase version to 2.X
Asked Answered
L

2

6

I recently updated to the new Firebase 3 but unfortunately as far as I can tell it doesn't support Geofire queries at the moment which is important in my app, I've rolled everything else in my application to using firebase 2 however when I try to deploy my app to firebase hosting I get an error saying:

"Error: Unable to authorize access to project

Note: This version of the Firebase CLI is only compatible with projects upgraded to the new Firebase Console. To access firebase.com apps, you will need to use a previous version: npm install -g firebase-tools@^2.1"

So then I tried to run npm install -g firebase-tools@^2.1 but when I try firebase -V it still says I'm on version 3.0. I also tried running npm uninstall firebase which returned unbuild [email protected] but if i check the firebase version it still say 3.0.1, I don't seem to be able to remove it, potentially i installed it elsewhere initially? I've run out of ideas please help!

Lighter answered 19/5, 2016 at 22:47 Comment(0)
W
8
  1. check your npm configuration

    npm prefix -g

  2. if the path is 'undefined',

    cd /usr/local/ remove the related firebase modules in bin, lib

  3. remove firebase modules in npm

    npm remove -g firebase-tools

  4. then install firebase-tools

    npm install -g firebase-tools@<specific_version>

  5. alias setting for firebase, if you need.

Westberg answered 30/7, 2019 at 0:49 Comment(0)
L
2

There was no issue with firebase it was with my NPM configuration and the $PATH wasn't correct. It could not save any applications globally not sure how it became changed.

I had to run:

npm config get prefix

Discovered that it wasn't:

/usr/local

then ran:

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

This allowed me to install firebase 2.1 globally:

npm install -g firebase-tools@^2.1
Lighter answered 20/5, 2016 at 1:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.