我在 Azure 上托管 Angular 应用程序时遇到问题

时间:2021-05-06 13:52:13

标签: angular azure-web-app-service

我在 Azure 上托管 Angular 应用程序时遇到问题。

我正在尝试使用 VS Code 在 Azure 上托管我的 angular 应用程序。当我运行 Azure 应用服务器时,出现以下错误。

Failed to load resource: the server responded with a status of 404 (Not Found)
/ResourceManagement/runtime-es2015.858f8dd898b75fe86926.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
/ResourceManagement/polyfills-es2015.a3f585d393ecee6ff04d.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
scripts.00866a06f9144eb57493.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
/ResourceManagement/main-es2015.f0fcb0bd3957ea1298d6.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
styles.f3e57793e0e36a1a66da.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)

当我签入我的 dist 文件夹并且可以在 Azure 存储库中看到这些文件时。 任何人都可以在这个问题上指导我。我是 Azure 的新手。

1 个答案:

答案 0 :(得分:0)

正如 Jason Pan 所说,您应该将文件放在 distwwwroothttps://angulardeploydist.scm.azurewebsites.net/DebugConsole enter image description here

对于 Linux 应用程序,添加带有 npx serve -s 的启动命令: enter image description here