Closed amit20897 closed 3 months ago
I found a few problems with this issue:
I'm running into this issue as well with the following environment:
node: v20.11.0
firebase-functions: 4.7.0
firebase-tools: 13.3.0
firebase-admin: 12.0.0
same here running into the issue. environment as follows: I'm running into this issue as well with the following environment:
node: v20.11.0
firebase-functions: 4.7.0
firebase-tools: 13.3.0
firebase-admin: 12.0.0
I am also running into the above issue. Same as @oconnorjoseph and @shaffy9633
Any updates ? Also facing a similar issue with the following environment:
node (v20.11.0), firebase-functions (4.7.0), firebase-tools (13.3.0), firebase-admin (12.0.0)
Unfortunately, many many years ago we gave "-" special meaning in functions and reverse compatibility ties our hands. If you want to export a function with a hyphen in its name, use object embedding. For example:
export test {
helloWorld: onCall((request) => {
return 'now working';
}),
}
This will also give you the additional feature of being able to deploy all functions inside the "test" object with a single --only
command: e.g. firebase deploy --only functions:test
or firebase deploy --only functions:test.helloWorld
Related issues
https://github.com/firebase/firebase-functions/issues/1279
Version info
node: v18.17.1
firebase-functions: ^4.7.0
firebase-tools: 13.2.1
firebase-admin: ^12.0.0
Deploy the function named:
test-helloWorld
as a onCall v2 functionSteps to reproduce
add the following to index.ts exports['test-helloWorld'] = onCall((request) => { return 'not working'; });
deploy with: firebase deploy --only functions:test-helloWorld
Expected behavior
function being deployed without errors.
Actual behavior
i functions: updating Node.js 18 (2nd Gen) function test-helloWorld(us-central1)... Could not create or update Cloud Run service test-helloworld, Container Healthcheck failed. Revision 'test-helloworld-00001-zox' is not ready and cannot serve traffic. The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable. Logs for this revision might contain more information.
For more troubleshooting guidance, see https://cloud.google.com/run/docs/troubleshooting#container-failed-to-start
Functions deploy had errors with the following functions: test-helloWorld(us-central1) i functions: cleaning up build files...
Error: There was an error deploying functions
Were you able to successfully deploy your functions?
No