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

Issue with firebase emulators #31

Open
noidwasavailable opened this issue Feb 8, 2024 · 0 comments
Open

Issue with firebase emulators #31

noidwasavailable opened this issue Feb 8, 2024 · 0 comments

Comments

@noidwasavailable
Copy link

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?

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