【发布时间】:2021-09-18 10:30:54
【问题描述】:
Function URL (app(us-central1)): https://us-central1-yisus-portfolio.cloudfunctions.net/app
Functions deploy had errors with the following functions:
app(us-central1)
To try redeploying those functions, run:
firebase deploy --only "functions:app"
To continue deploying other features (such as database), run:
firebase deploy --except functions
Error: Functions did not deploy properly.
是一个在 express 上创建的服务器,它发送 HTML JS 和 CSS,但使用服务器端渲染,当我部署另一个应用程序结束之前执行时,它可以工作。 文档说该函数的执行时间不能超过 60 秒,并且在函数的日志中说这需要 13000 (我猜是毫秒),但我不确定是否是这样,或者是否是我做的错误。
但是
当我运行firebase --serve --only functions, hosting
它可以工作,但是当我部署时没有
{
"hosting": {
"public": "public",
"rewrites": [ {
"source": "**",
"function": "app"
} ],
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
firebase.json
const functions = require("firebase-functions");
const { app } = require("./lib/server")
exports.app = functions.https.onRequest(app);
功能索引
【问题讨论】:
-
请尝试使用 --debug 标志 (
firebase deploy --only "functions:app" --debug) 运行部署命令,看看是否有任何错误日志可以从中挑选出来。
标签: node.js firebase express google-cloud-functions server-side-rendering