Skip to content

Unable to deploy callable function when exported alongside trigger functions #1357

Closed
@inorganik

Description

@inorganik

[REQUIRED] Environment info

firebase-tools: 6.4.0

Platform: macOS

[REQUIRED] Test case

I recently added a new callable function to my project. When I tried

firebase deploy --only functions:stripeOperation

It resulted in

⚠ functions: the following filters were specified but do not match
any functions in the project: stripeOperation

The file structure is like this:

    functions/
    ├── src/
    │   ├── stripe
    │   │    ├── index.ts
    │   │    ├── myTrigger.ts
    │   │    ├── anotherTrigger.ts
    │   │    └── stripeOperation.ts
    │   ├── index.ts

functions/src/stripe/index exported all 3 of the functions in the stripe folder:

export { stripeOperation } from './stripeOperation';
export { myTrigger } from './myTrigger';
export { anotherTrigger } from './anotherTrigger';

functions/src/index exported them from the stripe folder:

export { stripeOperation, myTrigger, anotherTrigger } from './stripe';

I discovered I could only deploy my callable function if it was exported separately from the trigger functions, otherwise I would get the "filters do not match" warning and it wouldn't get deployed.

functions/src/index:

export { stripeOperation } from './stripe/stripeOperation';
export { myTrigger, anotherTrigger } from './stripe';

[REQUIRED] Steps to reproduce

Create a trigger function and a callable function in a sub folder, and export them together, then try to deploy the callable function.

[REQUIRED] Expected behavior

You should be able to deploy callable and trigger functions that are exported together.

[REQUIRED] Actual behavior

You have to export them separately, or the callable function will get skipped.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions