我使用带有sudo firebase deploy的Mac终端部署我的功能。
我得到了回应:
=== Deploying to 'first-60012'...
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
> functions@ lint /Users/name/Desktop/ME/Projects/first/functions
> eslint .
✔ 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!转到firebase.com中的控制台,在函数中写着“等待您的第一个部署”。
试了三次,什么也没出现。
发布于 2018-12-19 05:42:06
几乎可以肯定的是,您没有在index.js中导出任何函数,也没有将任何文件指定为项目的主要入口点。您需要实际地编写和导出一些函数,以便firebase deploy能够获取它们。没有导出就意味着没有部署的功能。
如果您刚刚使用Firebase CLI创建了这个项目,并且尝试部署而不对它为您创建的文件进行任何更改,那么至少您应该打开index.js或index.ts,取消对helloWorld函数、的注释,并保存默认为您创建的文件。简单地不保存对文件的更改甚至可能是您的错误。
https://stackoverflow.com/questions/53845184
复制相似问题