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 emulators:start Fails with ESM Import Error in Emulator UI on MacOS #1059

Open
scottnimos opened this issue Oct 25, 2024 · 0 comments

Comments

@scottnimos
Copy link

scottnimos commented Oct 25, 2024

Describe the bug

Running firebase emulators:start --debug causes a fatal error in the Emulator UI, exiting with code 1. This error appears to be related to the module type for server.mjs, which requires ESM support but is being handled by CommonJS’s require().

To Reproduce

  1. Run firebase init and select only auth to emulate.
  2. Enable the Emulator UI during setup.
  3. Execute firebase emulators:start.

My firebase.json

{
  "emulators": {
    "auth": {
      "port": 9099
    },
    "ui": {
      "enabled": true
    },
    "singleProjectMode": true
  }
}

Expected behavior

The emulators should start successfully, with the Emulator UI accessible and logging as expected.

Screenshots

No screenshots were provided.

Desktop (please complete the following information):

  • OS: MacOS 15.0.1 (24A348)
  • Browser: (e.g., Chrome, Safari)
  • Version: (e.g., Chrome 22)

Additional context

  • Node version: v20.14.0
  • The error suggests using import() in place of require() for /server/server.mjs, aligning with Node's ESM requirements.
  • Emulator UI version: v1.14.0
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