我在index.ts
中定义了云函数。但是,当尝试使用firebase deploy
部署我的云函数时,Firebase CLI没有检测到我的函数。
端子输出
✔ functions: Finished running predeploy script.
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
i artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
✔ functions: required API cloudfunctions.googleapis.com is enabled
✔ functions: required API cloudbuild.googleapis.com is enabled
✔ artifactregistry: required API artifactregistry.googleapis.com is enabled
i functions: preparing codebase default for deployment
i functions: preparing cloud_functions directory for uploading...
i functions: packaged /Users/nils/cloud_functions (243.98 KB) for uploading
✔ functions: cloud_functions folder uploaded successfully
i functions: cleaning up build files...
✔ Deploy complete!
我的index.ts
import { submitFunction } from "./features/submit/submit_function";
我的submit_function.ts
:
第一次
2条答案
按热度按时间yhived7q1#
Firebase CLI仅查看顶级导出函数,并且
index.js
文件函数中唯一的顶级函数与任何Cloud Functions触发器的签名都不匹配。你在找这个吗?
afdcj2ne2#
问题是
submitFunction
函数是async
。将您的
submitFunction
从至