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
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.
Related
I am building a flutter project,
when I deploy firebase functions I am getting errors. The errors are not the same they change.
This is the command I've run:
firebase deploy --only functions:getOrder
Example:
Error: Cloud Runtime Config is currently experiencing issues, which is preventing your functions from being deployed. Please wait a few minutes and then try to deploy your functions again.
Run firebase deploy --except functions if you want to continue deploying the rest of your project.
Another possible error is:
Error: Failed to make request to https://serviceusage.googleapis.com/v1/projects/project-name/services/cloudfunctions.googleapis.com
I tried:
firebase login --reauth
firebase login and firebase logout
firebase use --add
Nothing works.
How to solve?
Is there another way to deploy firebase functions?
I have a GCP project that uses node.js javascript Google Cloud Functions that are triggered by Pub/Sub topics.
When setting up local testing according to this doc, it seems quite complicated.
Using Firebase PubSub emulator and Firebase Functions emulator seems much easier. Can I just use the Firebase Functions Emulator with my GCP Cloud Functions?
No. You can only use the Firebase emulator with functions written using the firebase-functions node module and deployed with the Firebase CLI. It will not work any other way.
The ease of use is part of the value of using the Firebase tools over the core GCP tools, but you do have to choose to use them, as they are not interchangeable.
Im hosting a node.js web app with firebase, and i need to run a powershell script. I have installed the node module "node-powershell" which works perfectly locally, however when deployed, it tells me that i need to install powershell (install it in the firebase 'computer'). Is there any way to do this?
Firebase Hosting is a so-called static hosting service. This means it serves the content as is, it does not interpret/execute that content in any way.
So most likely you're using the Cloud Functions integration with Firebase Hosting to run those Node scripts. And that turns this into a question whether Cloud Functions can run Powershell scripts.
I don't immediately seen an answer there, although you could potentially upload the binary yourself if that is available for the platform Cloud Functions runs on (Debian). For an example of this, see Can you call out to FFMPEG in a Firebase Cloud Function
Everytime if I want to export my webhook into my firebase project this happens:
functions: Finished running predeploy script.
i functions: ensuring necessary APIs are enabled...
functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
Deploy complete!
Project Console: https://console.firebase.google.com/project/Nameoftheproject-d9d5/overview
It says that the deploy is complete, but it doesn't create a function or export my webhook in my firebase project. I want to export all to a webhook so I can use it in my dialogflow project. Can someone help me out? I don't know what I did wrong.
Make sure you do the following
You need to enable Webhook in your Dialogflow fulfillment and paste the deployment URL of Firebase functions that are deployed using firebase deploy.
Like this:
Make sure you are using the correct Actions Project before firing firebase deploy
firebase use <PROJECT_ID>
Your Action's project ID can be found in the Actions Console, under Overview > (Gear icon) > Project settings.
Refer the following Google Codelabs link to setup connection between your local environment and firebase functions:
https://codelabs.developers.google.com/codelabs/actions-2/#2
I have an Azure Function App in C# that I precompile and deploy to Azure using VSTS. I am successfully deploying and can test my 2 HTTP triggers from postman and the command line.
I am now trying to use these Functions in a Logic App. When I go to create a Function action, I select my Function App but it does not recognize my 2 Functions.
Selecting the onsite-functions app should show my 2 Functions.
But instead, it prompts me to create a Function.
I have created an OpenAPI spec for this Function App, but this does not help. Does anyone have any ideas on how to get my Functions showing up in the Logic App designer?
Update
Switching from a Kudu deployment to an Azure App Service Deploy step seems to fix the issue.