firebase-tools: Fail to start emulator ui with "firebase emulators:start"
[REQUIRED] Environment info
firebase-tools:
$ firebase --version
11.0.0
Platform:
$ cat /etc/issue
Debian GNU/Linux 10 \n \l
[REQUIRED] Test case
$ firebase emulators:start
i emulators: Starting emulators: auth, firestore, pubsub, storage
i firestore: Firestore Emulator logging to firestore-debug.log
i pubsub: Pub/Sub Emulator logging to pubsub-debug.log
i ui: Emulator UI logging to ui-debug.log
⚠ ui: Fatal error occurred:
Emulator UI has exited with code: 1,
stopping all running emulators
i ui: Stopping Emulator UI
⚠ ui: Error stopping Emulator UI
i firestore: Stopping Firestore Emulator
i pubsub: Stopping Pub/Sub Emulator
i auth: Stopping Authentication Emulator
i storage: Stopping Storage Emulator
i hub: Stopping emulator hub
i logging: Stopping Logging Emulator
The settings are as follows:
$ cat firebase.json
{
"firestore": {
"rules": "config/firestore.rules",
"indexes": "config/firestore.indexes.json"
},
"storage": {
"rules": "config/storage.rules"
},
"emulators": {
"ui": {
"host": "0.0.0.0",
"port": 4900
},
"auth": {
"host": "0.0.0.0",
"port": 4904
},
"storage": {
"host": "0.0.0.0",
"port": 4905
},
"firestore": {
"host": "0.0.0.0",
"port": 4906
},
"pubsub": {
"host": "0.0.0.0",
"port": 4907
},
"hub": {
"host": "0.0.0.0",
"port": 4998
},
"logging": {
"host": "0.0.0.0",
"port": 4999
}
}
}
[REQUIRED] Steps to reproduce
Same as above.
[REQUIRED] Expected behavior
I’m hoping the Emulator UI will boot…
[REQUIRED] Actual behavior
The following PRs may be the cause.
- https://github.com/firebase/firebase-tools/pull/4556
- https://github.com/firebase/firebase-tools/pull/4555
$ firebase --debug emulators:start
[snip]
[2022-05-19T14:02:24.780Z] Starting Emulator UI with command {"binary":"node","args":["--dns-result-order=ipv4first","/root/.cache/firebase/emulators/ui-v1.7.0/server.bundle.js"],"optionalArgs":[],"joinArgs":false} {"metadata":{"emulator":{"name":"ui"},"message":"Starting Emulator UI with command {\"binary\":\"node\",\"args\":[\"--dns-result-order=ipv4first\",\"/root/.cache/firebase/emulators/ui-v1.7.0/server.bundle.js\"],\"optionalArgs\":[],\"joinArgs\":false}"}}
i ui: Emulator UI logging to ui-debug.log {"metadata":{"emulator":{"name":"ui"},"message":"Emulator UI logging to \u001b[1mui-debug.log\u001b[22m"}}
[2022-05-19T14:02:24.955Z] node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '/app/--dns-result-order=ipv4first'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function._resolveFilename (pkg/prelude/bootstrap.js:1955:46)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.runMain (pkg/prelude/bootstrap.js:1983:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
{"metadata":{"emulator":{"name":"ui"},"message":"node:internal/modules/cjs/loader:936\n throw err;\n ^\n\nError: Cannot find module '/app/--dns-result-order=ipv4first'\n at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)\n at Function._resolveFilename (pkg/prelude/bootstrap.js:1955:46)\n at Function.Module._load (node:internal/modules/cjs/loader:778:27)\n at Function.runMain (pkg/prelude/bootstrap.js:1983:12)\n at node:internal/main/run_main_module:17:47 {\n code: 'MODULE_NOT_FOUND',\n requireStack: []\n}\n"}}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 33
- Comments: 15 (3 by maintainers)
Hi all, thanks to all the information provided, we’ve located the issue in the standalone Firebase CLI binary. You can try the npm version (
npm install -g firebase-toolsand remove the standalone binary) as a workaround while we’re looking into a fix.Fixed in v11.2.2.
Downgrading the Firebase CLI to 10.9.2 allows to workaround this.
@yuchenshi this workaround works. To remove the standalone version:
I’m using Node v18.2.0 with nvm and downgrade not working. I’m getting error like below
node:internal/modules/cjs/loader:936 throw err; ^
Error: Cannot find module “/home/lukasz/projects/xxxxxxxxx/–dns-result-order=ipv4first” at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function._resolveFilename (pkg/prelude/bootstrap.js:1955:46) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Function.runMain (pkg/prelude/bootstrap.js:1983:12) at node:internal/main/run_main_module:17:47 { code: “MODULE_NOT_FOUND”, requireStack: [] }
I know it’s not helpful but - really?