-
Notifications
You must be signed in to change notification settings - Fork 215
Open
Labels
Description
Related issues
[REQUIRED] Version info
node: 22.17.1
firebase-functions: 6.4.0
firebase-tools: 14.11.1
firebase-admin: 13.4.0
[REQUIRED] Test case
import { onCall } from 'firebase-functions/v2/https';
import { projectID } from 'firebase-functions/params';
export const helloworld = onCall<unknown, string>(
{ cors: projectID.equals('something').thenElse(['http://localhost:5173'], []) },
() => {
return 'Hello from Firebase!';
},
);
[REQUIRED] Steps to reproduce
- Just create a firebase-functions project and deploy the given function.
[REQUIRED] Expected behavior
Deploys cleanly without warnings.
[REQUIRED] Actual behavior
Gets a warning:
{"severity":"WARNING","message":"params.PROJECT_ID == \"something\" ? [\"http://localhost:5173\"] : [].value() invoked during function deployment, instead of during runtime."}
{"severity":"WARNING","message":"This is usually a mistake. In configs, use Params directly without calling .value()."}
{"severity":"WARNING","message":"example: { memory: memoryParam } not { memory: memoryParam.value() }"}
Despite not using .value()
in my code. The .value()
is inside firebase-functions own code.
Were you able to successfully deploy your functions?
Yes.
giladnavot