Error:
Error: Could not start Firestore Emulator, port taken.
i emulators: Starting emulators: auth, functions, firestore, database, hosting, pubsub ⚠ hosting: The hosting emulator is configured but there is no hosting configuration. Have you run firebase init hosting? ⚠ firestore: Port 8080 is not open on localhost (127.0.0.1,::1), could not start Firestore Emulator. ⚠ firestore: To select a different host/port, specify that host/port in a firebase.json config file: { // ... "emulators": { "firestore": { "host": "HOST", "port": "PORT" } } } ⚠ database: Port 9000 is not open on localhost (127.0.0.1,::1), could not start Database Emulator. ⚠ database: To select a different host/port, specify that host/port in a firebase.json config file: { // ... "emulators": { "database": { "host": "HOST", "port": "PORT" } } }
A quick way to fix this is to use the kill-port package from NPM (https://www.npmjs.com/package/kill-port)
npx kill-port --port 8000,9099,5001,8080,9000,5000,8085,9199,4000,4400,4500 && firebase emulators:start --project default
You're good to go 🙌🏾