firebase/firebase-tools-ui

SyntaxError: Unexpected string

endrureza opened this issue · 3 comments

Describe the bug

I got a bug when i run firebase emulators:start

// ui-debug.log

/Users/tabsquare/.cache/firebase/emulators/ui-v1.11.5/server/server.js:569
        re"use strict";
          ^^^^^^^^^^^^

SyntaxError: Unexpected string
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.16.0
  • NPM version: 18.16.0
  • Firebase Tools Version: 11.28.0 (i'm not using 11.29.0 because it produces error)

To Reproduce

Steps to reproduce the behavior:

With this firebase.json

{
  "emulators": {
    "singleProjectMode": true,
    "firestore": {
      "port": 8080,
      "host": "0.0.0.0"
    },
    "ui": {
      "enabled": true,
      "host": "0.0.0.0",
      "port": 4000
    }
  }
}

Run firebase emulators:start

Expected behavior

Firestore and UI should run well

Alright, the solution is changing node to v18.15, remove .cache/firebase and rerun firebase emulators:start once more.

How can I remove .cache/firebase?

rm -rf ~/.cache/firebase