在 Azure Web App Node.JS 18 中部署 Angular 17 SSR

问题描述 投票:0回答:1

目前,关于将 Angular 17 服务器端渲染应用程序部署到 Azure Node.JS v18 中的 Web 应用程序,我遇到了非常令人沮丧的情况。由于某种原因,它花费了大量的时间来构建,最终失败了,我真的不明白这实际上应该是怎样的。

有人曾经成功地将 Angular 17 SSR 部署到 Azure 中吗? 不幸的是,Angular 文档没有提供任何信息,无论是 Azure,我不确定我是否做错了什么。

5小时后显示的错误是:

Run npm run build

> [email protected] build
> ng build

- Building...

Error: The operation was canceled.

我尝试通过 Github 操作进行部署,在 Azure Node.js v18 中获取 Web 应用程序

"prerender": true,
"aot": true,

"budgets": [
  {
    "type": "initial",
    "maximumWarning": "500kb",
    "maximumError": "1.1mb"
  },
  {
    "type": "anyComponentStyle",
    "maximumWarning": "2kb",
    "maximumError": "4kb"
  }
],

依赖关系

"@angular/animations": "^17.3.0",
"@angular/cdk": "^17.3.10",
"@angular/common": "^17.3.0",
"@angular/compiler": "^17.3.0",
"@angular/core": "^17.3.0",
"@angular/forms": "^17.3.0",
"@angular/platform-browser": "^17.3.0",
"@angular/platform-browser-dynamic": "^17.3.0",
"@angular/platform-server": "^17.3.0",
"@angular/router": "^17.3.0",
"@angular/ssr": "^17.3.6",
"@auth0/angular-jwt": "^5.2.0",
"@tailwindcss/forms": "^0.5.7",
"angular-oauth2-oidc": "^17.0.2",
"express": "^4.18.2",
"marked": "^12.0.2",
"ngx-localstorage": "^6.0.0",
"ngx-markdown": "^17.2.1",
"ngx-sonner": "^1.0.0",
"prismjs": "^1.29.0",
"rxjs": "~7.8.0",
"stackedit-js": "^1.0.7",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"

有人可以帮忙解决这种情况吗? 预先感谢。

angular azure github-actions server-side-rendering
1个回答
0
投票

看来您的机器制造商有问题。 如果可以的话,请查看机器指标,例如磁盘 R/W、CPU 使用率、网络。 您不会报告任何超时,但请确保您能够与互联网通信以获取您的工件构建 URL。

© www.soinside.com 2019 - 2024. All rights reserved.