英文:
Issue with deploying Angular Universal app with Angular Fire on Firebase
问题
我目前在部署我的Angular Universal应用程序时遇到了问题,该应用程序使用Angular Fire在Firebase上运行。我已经遵循了官方的Angular Universal文档和新的Firebase web框架指南,但在运行ng deploy或firebase deploy时没有得到预期的结果。
这是我的设置详情:
- Angular版本: v16.1
- Angular Universal版本: v16.1
- Angular Fire版本: v7.6.1
- 仓库: https://github.com/plungarini/lungabros
当我检查Firebase部署日志时,我看到以下错误消息:
hosting[lungabros]: 无法找到函数 `ssrlungabros` 的有效端点,但仍然将其包含在配置中。
似乎服务器端渲染(SSR)函数未正确生成。我还注意到该函数在“Functions”选项卡或Google Cloud控制台中的“Google Run”选项卡中不可见。
我已经仔细检查了我的Angular Universal配置和Firebase配置,确保我已经按照所有必要的步骤和依赖项进行了设置。
我会感激任何关于如何解决这个问题的指导或建议。
英文:
I'm currently facing an issue while deploying my Angular Universal app with Angular Fire on Firebase. I have followed the official Angular Universal documentation and the new Firebase web frameworks guide, but I'm not getting the expected result when running ng deploy or firebase deploy.
Here are the details of my setup:
- Angular version: v16.1
- Angular Universal version: v16.1
- Angular Fire version: v7.6.1
- Repository: https://github.com/plungarini/lungabros
When I check the Firebase deploy logs, I see the following error message:
hosting[lungabros]: Unable to find a valid endpoint for function `ssrlungabros`, but still including it in the config
It seems that the server-side rendering (SSR) function is not being generated properly. I have also noticed that the function is not visible in the "Functions" tab or the "Google Run" tab in the Google Cloud console.
I have already double-checked my Angular Universal configuration and Firebase configuration, ensuring that I have followed all the required steps and dependencies.
I would appreciate any guidance or suggestions on how to resolve this.
答案1
得分: 1
显然,在我的 firebase.json 文件中,在 "frameworksBackend" 选项中将 "minInstances" 设置为 1 可以修复 ssr 函数部署。
更新:
实际上,你需要使用 firebase deploy
而不是 ng deploy
。这样可以解决这个问题。这与 minInstances 配置无关。
英文:
Apparently setting "minInstances" to 1 in my firebase.json inside "frameworksBackend" options, fixed the ssr function deployment.
Update:
Actually you'll have to use firebase deploy
rather than ng deploy
. This solves the issue. Is not a minInstances config.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论