在Firebase上部署Angular Universal应用程序与Angular Fire存在问题。

huangapple go评论59阅读模式
英文:

Issue with deploying Angular Universal app with Angular Fire on Firebase

问题

我目前在部署我的Angular Universal应用程序时遇到了问题,该应用程序使用Angular Fire在Firebase上运行。我已经遵循了官方的Angular Universal文档和新的Firebase web框架指南,但在运行ng deploy或firebase deploy时没有得到预期的结果。

这是我的设置详情:

当我检查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:


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.

huangapple
  • 本文由 发表于 2023年6月15日 06:10:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76477895.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定