【发布时间】:2019-06-17 18:50:34
【问题描述】:
在对应用程序进行一些修改后,我正在尝试将我的 SSR 应用程序部署到最初从 https://github.com/subhendukundu/template-react-ssr/tree/feature/react-router 分叉的 Firebase 中。
当我做sudo firebase serve --only functions,hosting 时效果很好,但当我做firebase deploy 时抛出错误。
可重现的 repo 是 https://github.com/subhendukundu/template-react-ssr/tree/feature/react-router,它有一个 package.json https://github.com/subhendukundu/template-react-ssr/tree/feature/react-router/public
我也使用公共目录作为我的函数目录,https://github.com/subhendukundu/template-react-ssr/blob/feature/react-router/firebase.json。
但是,即使我为我的云函数使用不同的函数目录,我也会看到相同的错误。
无论如何我可以解决它吗?
【问题讨论】:
-
next.js 会解决这个问题吗?
-
您能添加您收到的错误消息吗?
-
Function failed on loading user code. Error message: Code in file index.js can't be loaded. Is there a syntax error in your code? Detailed stack trace: TypeError: c(...) is not a function at Object.<anonymous> (/user_code/assets/app.server.js:1:28950) at Object.module.exports.n (/user_code/assets/app.server.js:1:29283) . . . . Functions deploy had errors. To continue deploying other features (such as database), run: firebase deploy --except functions Error: Functions did not deploy properly. -
对错误有什么建议吗?
-
@SubhenduKundu 今天你问了一个question,我成功地解决了这个问题,但是你删除了那个帖子,所以我要求你重新发布同样的问题...... 请告诉如果你已经解决了我的问题
标签: reactjs firebase google-cloud-functions firebase-hosting next.js