Skip to content

Functions emulator tries to start if it just sees a functions folder present #6450

Closed

Description

@CodingDoug

Environment info

firebase-tools: 12.7.0

Platform: macOS

Test case

Functions emulator starts with nothing more than a functions folder present.

Steps to reproduce

$ firebase init emulators
... choose only Firestore
... take all the defaults

$ firebase emulators:start
... see that only Firestore starts
... ^C

$ mkdir functions
$ firebase emulators:start
... see that Functions emulator runs

The emulator generates the error:

⬢ functions: Failed to load function definition from source: FirebaseError: Could not detect language for functions at /path/to/functions

But the emulator continues to run on the default 5001 port.

Expected behavior

I expect that the functions emulator not try to run at all.

IMO the only time it should try to run is if there is something in my firebase.json that suggests it should (perhaps a value for port under emulators/functions/port).

Actual behavior

Explained above.

Activity

  1. aalej commented on Oct 17, 2023

    @aalej
    Contributor

    Hi @CodingDoug, thanks for raising this issue and for providing a detailed report. I was able to reproduce the behavior you mentioned. I’ll notify our engineering team about this issue and mark this as reproducible.

  2. aalej commented on Oct 17, 2023

    @aalej
    Contributor

    I discussed this with our engineering team and we do agree that this request is reasonable, but we’re concerned that removing this behavior from the CLI could break some users' existing setup.

    We’ll work on proposing the change in behavior for the next major release.

  3. added a commit that references this issue on Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions