0
votes

Im trying to set up the firebase simulator for testing the security rules for my Firestore realtime DB.

Im following the official google tutorial at: https://firebase.google.com/docs/firestore/security/test-rules-emulator

I have set up the Firebase CLI using the google official tutorial at: https://firebase.google.com/docs/firestore/security/test-rules-emulator but when i run the command:

 firebase setup:emulators:firestore

But I'm getting the following error:

  MY_USER$ firebase setup:emulators:firestore
  Error: setup:emulators:firestore is not a Firebase command

Here are some info on what is installed on my machine, Im suspecting that the reason might be a old version of firebase but Im not sure since i have reinstalled everything connected to firebase locally:

MY_USER$ firebase -V
3.18.5

MY_USER$ npm show firebase
[email protected] | Apache-2.0 | deps: 8 | versions: 700
Firebase JavaScript library for web and Node.js
https://firebase.google.com/

MY_USER$ npm show firebase-tools
[email protected] | MIT | deps: 39 | versions: 120
Command-Line Interface for Firebase
https://github.com/firebase/firebase-tools

MY_USER$ npm -v -g firebase
6.7.0

MY_USER$ npm -v firebase-tools
6.7.0
1

1 Answers

0
votes

The instance of firebase-tools that is in your path doesn't match the one that's being reported by npm. The one in your path that you're showing with firebase -V is really old. You're going to have to figure out what you actually have installed and where, and possibly change your PATH to match. In the end, you need to be able to run firebase -V and see version 6.5.0, which is the latest public version at the time I'm writing this.