在Azure平台上部署Nextjs应用程序时出现Azure错误

4xy9mtcn  于 2023-05-06  发布在  其他
关注(0)|答案(1)|浏览(204)

请参阅github错误。

报错:

https://github.com/Azure/static-web-apps/issues/1148

Azure Project部署日志:

https://github.com/BlockchainDeveloper009/KrumpKings-webapp-thirdweb/actions/runs/4813483408/jobs/8570062624

错误日志:

○  (Static)  automatically rendered as static HTML (uses no initial props)

Preparing output...

Copying files to destination directory '/bin/staticsites/2f9196ac-4c8b-4fa7-8362-1308441ee5b3-swa-oryx/app'...
Done in 9 sec(s).

Removing existing manifest file
Creating a manifest file...
Manifest file created.
Copying .ostype to manifest output directory.

Done in 108 sec(s).

---End of Oryx build logs---
Finished building app with Oryx
An unknown exception has occurred

For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
Exiting

原始错误:

“报告错误:https://github.com/Azure/static-web-apps/issues/1148
Azure项目部署日志:
https://github.com/BlockchainDeveloper009/KrumpKings-webapp-thirdweb/actions/runs/4813483408/jobs/8570062624
我修复了上面的错误,然后开始得到“未知错误”
我不知道如何处理这个问题。谁能帮我分析一下这个错误。
我是Azure和Cloud的新手。

5lwkijsr

5lwkijsr1#

获取“未知错误”
部署应用程序时出现的 * 未知错误 * 可能是由于以下各种原因:

  • 配置设置不正确、缺少依赖项或部署过程存在问题。
  • 检查日志以获取有关错误的详细信息,从而解决问题。
  • 确保正确安装和配置了所有必需的依赖项。
  • 并尝试重新部署应用程序,检查问题是否仍然存在。参考doc了解如何检查github日志。

我已经创建了一个示例nextjs应用程序,并通过github部署到Azure。

工作流文件:

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy

# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Node.js app to Azure Web App - pravnextjsapp

on:

push:

branches:

- main

workflow_dispatch:

jobs:

build:

runs-on: windows-latest

steps:

- uses: actions/checkout@v2

- name: Set up Node.js version

uses: actions/setup-node@v1

with:

node-version: '18.x'

- name: npm install, build, and test

run: |

npm install

npm run build --if-present

npm run test --if-present

- name: Upload artifact for deployment job

uses: actions/upload-artifact@v2

with:

name: node-app

path: .

deploy:

runs-on: ubuntu-latest

needs: build

environment:

name: 'Production'

url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:

- name: Download artifact from build job

uses: actions/download-artifact@v2

with:

name: node-app

- name: 'Deploy to Azure Web App'

uses: azure/webapps-deploy@v2

id: deploy-to-webapp

with:

app-name: 'pravnextjsapp'

slot-name: 'Production'

publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_XXXXXXXXXXXXXXX }}

package: .

Github:

门户:

相关问题