1

I am using node.js to deploy firebase cloud function, I got a problem I have some js files require my custom functions. When my custom function is updated, how can I deploy it? For instance, I have two js files Purchase.js and MyTime.js

Puchase.js const MyTime = require('../Scoz/MyTime.js');

MyTime.js some methods

If I only modified MyTime.js how can I deploy it? Normally, I use firebase deploy --only functions: Purchase to deploy function, but if I only want to update "MyTime.js". How can I do?

Many thanks

1 Answer 1

1

You cannot just update those custom function (which are not cloud functions). You would have to deploy the function(s) which uses that custom functions.

firebase deploy --only functions:cloudFunctionOne

This will deploy only cloudFunctionOne and if I recall correctly, the custom function will be updated for this cloud function only.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you very much. "the custom function will be updated for this cloud function only" <= does this mean every cloud function which requires my custom function(MyTime.js) need to be redeployed again.
@Scozirge2 I guess yes. Checkout this question for confirmation on that. If there's no issue you can deploy all functions at once tbh.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.