404 Not Found错误日志如下。
/home/LogFiles/2023_06_08_lw0sdlwk0005Y6_default_docker.log (https://smartinventorytestapp.scm.azurewebsites.net/api/vfs/LogFiles/2023_06_08_lw0sdlwk0005Y6_default_docker.log)
2023-06-08T10:38:05.458442645Z requireStack: [ '/home/site/wwwroot/node_modules/.bin/ng' ]
2023-06-08T10:38:05.458447245Z }
2023-06-08T10:38:05.467645994Z
2023-06-08T10:38:05.467666994Z Node.js v18.16.0
2023-06-08T10:38:05.589260559Z npm notice
2023-06-08T10:38:05.590561180Z npm notice New minor version of npm available! 9.6.4 -> 9.7.1
2023-06-08T10:38:05.597526393Z npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.7.1>
2023-06-08T10:38:05.600323238Z npm notice Run `npm install -g npm@9.7.1` to update!
2023-06-08T10:38:05.600345538Z npm notice
/home/LogFiles/2023_06_08_lw0sdlwk0005Y6_docker.log (https://smartinventorytestapp.scm.azurewebsites.net/api/vfs/LogFiles/2023_06_08_lw0sdlwk0005Y6_docker.log)
2023-06-08T11:03:52.503Z INFO - Digest: sha256:b1dc34abcaac6f00dd945840a5bc6367123b63b56465a5ec20c316eca98e569e
2023-06-08T11:03:52.504Z INFO - Status: Image is up to date for mcr.microsoft.com/appsvc/node:18-lts_20230502.1.tuxprod
2023-06-08T11:03:52.564Z INFO - Pull Image successful, Time taken: 0 Minutes and 0 Seconds
2023-06-08T11:03:52.814Z INFO - Starting container for site
2023-06-08T11:03:52.816Z INFO - docker run -d --expose=8080 --name smartinventorytestapp_2_3ea52a68 -e WEBSITE_SITE_NAME=smartinventorytestapp -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=smartinventorytestapp.azurewebsites.net -e WEBSITE_INSTANCE_ID=b11066f3267a7e6498984ab6d3b7a2745eba6596408cd3418260e10128c4799c -e NODE_OPTIONS=--require /agents/nodejs/build/src/Loader.js -e WEBSITE_USE_DIAGNOSTIC_SERVER=True appsvc/node:18-lts_20230502.1.tuxprod pm2 serve /home/site/wwwroot --no-daemon --spa
2023-06-08T11:03:52.816Z INFO - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2023-06-08T11:04:01.385Z INFO - Initiating warmup request to container smartinventorytestapp_2_3ea52a68 for site smartinventorytestapp
2023-06-08T11:04:20.272Z INFO - Waiting for response to warmup request for container smartinventorytestapp_2_3ea52a68. Elapsed time = 18.887329 sec
Ending Log Tail of existing logs ---
Starting Live Log Stream ---
2023-06-08T11:04:27.567Z INFO - Container smartinventorytestapp_2_3ea52a68 for site smartinventorytestapp initialized successfully and is ready to serve requests
我希望我的应用程序运行正常,但结果是404 Not Found
1条答案
按热度按时间iq0todco1#
感谢@Constantine Mora和@Satheesh Elumalai提供的明确步骤。
我已经从这两个文档中引用了参考资料,并且能够构建和运行Angular App to Azure App Service。
当我们部署Simple Angular App时,我正在部署到
Azure Windows App Service
。在
Azure Portal
中,使用Runtime Stack NODE创建一个新的Web App。npm install -g @angular/cli
命令。ng new ang-app-12June
创建一个新应用。ng serve --open
以在本地运行应用程序。ng build
以获取最新更改。在
VSCode
中,安装Azure App Service
扩展。Azure
tab =>Resources
中搜索我们在初始步骤中创建的WebApp。dist
文件夹。package.json
文件中找到应用程序名称。输出: