Upgrade `firebase-tools`

When I used Firebase from the CLI, at the end of the command output I got:

   ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
   │                                                                                                                     │
   │                                          Update available 13.9.0 → 13.10.2                                          │
   │                                   To update to the latest version using npm, run                                    │
   │                                            npm install -g firebase-tools                                            │
   │   For other CLI management options, visit the CLI documentation (https://firebase.google.com/docs/cli#update-cli)   │
   │                                                                                                                     │
   │                                                                                                                     │
   │                                                                                                                     │
   ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

I’m quite sure that updating by npm i -g firebase-tools isn’t the way to go, considering that

paypal-integration-6137092:~/paypal-integration$ which firebase
/google/idx/builtins/bin/firebase

What would be the right way to update it?

1 Like

We’ll have a fix out to update this shortly. Thanks for raising this bug.

2 Likes

Hi

Why does my firebase-tools only go up to 12.4.8, at most?

You can install firebase-tools via the CLI, and it will take precedent over the one we install via Nix.

@bacelar - does this help? You can install any version of the Firebase Tools that you want.

hi man, thanks, but does not work for me… after run npm install @13…, firebase --version return 12…

Did you install it globally?

Yeah, with the install firebase@latest, still stuck at 12.4.8. Anyway to fix this?

I’m running into the same issue. Firebase is installed in /usr/bin/firebase at 12.4.8 and that overrides any installation in your path.

You’ll be able to find your install at /home/user/.global_modules/bin/firebase (interestingly, if you search for Firebase binaries, you find a few versions in /nix/store/firebase-tools, but not 13.6.0).

I’ll see if I can find the bug and escalate or add a new one, but in the meantime, you can just run the Firebase CLI with this path:

/home/user/.global_modules/bin/firebase

(Also, if you’re using Data Connect and hitting this issue, you’ll need to deploy from the command line as the Deploy button uses /usr/bin/firebase, too.)

1 Like

This seems like something we need to address differently! I’ll flag this for our team to investigate as well. Ideally, we should support globally installing Firebase tools and having all related dependencies recognize the new version.

is there a work-around?

We’ve made a change so that for new workspaces IDX should no-longer be installing firebase-tools 12.4.8 to /usr/bin
As a result you should see a newer version of firebase-tools installed, and it should be possible to override this with npm install -g firebase-tools

This should just work for new workspaces.
If you have an existing (flutter) workspace with this issue, you can try removing pkgs.nodePackages.firebase-tools from idx/dev.nix and then rebuilding the environment

Let me know if you encounter any further issues with this

4 Likes