lana-cli icon indicating copy to clipboard operation
lana-cli copied to clipboard

Issue with firebase emulators

Open noidwasavailable opened this issue 1 year ago • 0 comments

I have a package.json script that is:

"serve": "yarn run build && firebase emulators:start --only functions"

When I run yarn run serve, it works properly. But when I select serve by using lana, I get an error from firebase. It looks like it might not be reading my firebase.json properly?

My firebase.json looks like:

  "functions": [
    {
      "source": ".",
      "ignore": [
        "node_modules",
        ".git",
        "firebase-debug.log",
        "firebase-debug.*.log"
      ],
      "predeploy": ["yarn run build"]
    }
  ]
}

I am using a local version of node v18 instead of the globally installed node v21 using nvm, but looking at firebase debug logs, that doesn't seem to be the issue...

Logs:

[debug] [2024-02-08T01:48:26.941Z] ----------------------------------------------------------------------
[debug] [2024-02-08T01:48:26.942Z] Command:       /my-folder-name/node_modules/.bin/firebase emulators:start --only functions
[debug] [2024-02-08T01:48:26.942Z] CLI Version:   7.16.2
[debug] [2024-02-08T01:48:26.942Z] Platform:      darwin
[debug] [2024-02-08T01:48:26.942Z] Node Version:  v18.17.1
[debug] [2024-02-08T01:48:26.943Z] Time:          Thu Feb 08 2024 10:48:26 GMT+0900 (GMT+09:00)
[debug] [2024-02-08T01:48:26.943Z] ----------------------------------------------------------------------
[debug] [2024-02-08T01:48:26.943Z] 
[debug] [2024-02-08T01:48:26.946Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2024-02-08T01:48:26.946Z] > authorizing via signed-in user
[info] i  emulators: Starting emulators: functions
[debug] [2024-02-08T01:48:26.968Z] [hub] writing locator at /some-location.json
[info] ✔  hub: emulator hub started at http://localhost:4400
[info] i  emulators: Shutting down emulators.
[info] i  hub: Stopping emulator hub
[debug] [2024-02-08T01:48:27.226Z] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:405:5)
    at validateString (node:internal/validators:162:11)
    at Object.join (node:path:1171:7)
    at Object.<anonymous> (/my-folder-name/node_modules/firebase-tools/lib/emulator/controller.js:162:39)
    at Generator.next (<anonymous>)
    at fulfilled (/my-folder-name/node_modules/firebase-tools/lib/emulator/controller.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[error] 
[error] Error: An unexpected error has occurred.

How would I go about fixing this issue?

noidwasavailable avatar Feb 08 '24 01:02 noidwasavailable