Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firebase emulator not working #226

Open
riceball1 opened this issue Jul 12, 2022 · 0 comments
Open

firebase emulator not working #226

riceball1 opened this issue Jul 12, 2022 · 0 comments

Comments

@riceball1
Copy link

riceball1 commented Jul 12, 2022

I attempted to follow this step here but when I ran the command firebase emulators:start --only hosting it would gave me the following error Error: Could not start Hosting Emulator, port taken.

firebase emulators:start --only hosting
i  emulators: Starting emulators: hosting
i  emulators: Shutting down emulators.
i  hub: Stopping emulator hub
⚠  hosting: Port 5000 is not open on localhost, could not start Hosting Emulator.
⚠  hosting: To select a different host/port, specify that host/port in a firebase.json config file:
      {
        // ...
        "emulators": {
          "hosting": {
            "host": "HOST",
            "port": "PORT"
          }
        }
      }
i  emulators: Shutting down emulators.

Error: Could not start Hosting Emulator, port taken.

I think a fix is to add the following in firebase.json file, though wonder if there's a way to use dynamic open port variables instead of hardcoding ones:

"emulators": {
      "firestore": {
        "port": 5002
      },
      "functions": {
        "port": 5001
      },
      "hosting": {
        "port": 5005
      }
    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant