firebase / firebase-tools-ui

A local-first UI for Firebase Emulator Suite.
https://firebase.googleblog.com/2020/05/local-firebase-emulator-ui.html
Apache License 2.0
269 stars 61 forks source link

SyntaxError: Unexpected string #943

Closed endrureza closed 1 year ago

endrureza commented 1 year ago

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

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

endrureza commented 1 year ago

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

blueberny commented 1 year ago

How can I remove .cache/firebase?

Seancheey commented 1 year ago
rm -rf ~/.cache/firebase