1

I am trying to update my Firebase CLI installation, in order to use the cloud functions for my project. I followed the getting-started guide, however for some reason, the CLI cannot detect the updated version.

I initialized a project of mine that I have already created via the Firebase console. During the project initialization, Firebase CLI mentioned that my CLI version should be updated, however the complete procedure went smoothly.

Once the initialization completed, I run for the first time (to update the CLI):

npm install -g firebase-tools

Once the updated finished, the command line reported:

firebase-tools@3.18.6

But when I run

firebase init functions

I get:

Error: CLI is out of date (on 3.0.1 , need at least 3.0.5)

I don't understand why this is happening, since the update reported that version 3.18.6 got installed Any hints would be great!

For reference, you can see a snapshot of the command line here.

Dimitris
  • 419
  • 4
  • 19
  • Do you try firebase-tools@latest? – Diego Venâncio Jun 06 '18 at 11:05
  • Yes, I just did, and unfortunately shows the same error.. For some reason, I have the feeling that maybe I need to manually delete files which prevent CLI from recognizing the updated version. But I have no idea where I could look for something like that.. – Dimitris Jun 06 '18 at 11:11
  • Please don't use images - just copy the text into the question so it's easier to read and search. – Doug Stevenson Jun 06 '18 at 14:32
  • @DougStevenson, thanks for the edit and the suggestion, I updated the original question. – Dimitris Jun 06 '18 at 15:48

1 Answers1

1

It looks like you may have multiple versions of node installed in different locations. First, uninstall all versions of node that you may have previously installed. Make sure running node on the command line doesn't execute anything. Then, reinstall everything. After you've installed the Firebase CLI again, check its version with firebase --version.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • Yep, that was the problem. For some reason there was a conflict. I followed the instructions here ( https://stackoverflow.com/questions/20711240/how-to-completely-remove-node-js-from-windows ) to completely remove node, and it worked. Thanks a lot! – Dimitris Jun 07 '18 at 07:54