输出:
1:50:53 PM macazure: Starting deployment...
1:50:53 PM macazure: Creating zip package...
1:50:54 PM macazure: Ignoring files from "appService.zipIgnorePattern"
"node_modules{,/**}"
".vscode{,/**}"
2:00:47 PM macazure: Zip package size: 294 MB
2:01:16 PM macazure: Fetching changes.
2:01:17 PM macazure: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/4b4b5d91-5076-412f-882a-17d9ca7bcd6a.zip (288.92 MB) to /tmp/zipdeploy/extracted
2:03:48 PM macazure: Updating submodules.
2:03:49 PM macazure: Preparing deployment for commit id '289201ab-2'.
2:03:49 PM macazure: PreDeployment: context.CleanOutputPath False
2:03:49 PM macazure: PreDeployment: context.OutputPath /home/site/wwwroot
2:03:49 PM macazure: Repository path is /tmp/zipdeploy/extracted
2:03:50 PM macazure: Running oryx build...
2:03:50 PM macazure: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform nodejs --platform-version 20 -p virtualenv_name= --log-file /tmp/build-debug.log -i /tmp/8dc11aa4bf86edc -p compress_node_modules=tar-gz | tee /tmp/oryx-build.log
2:03:50 PM macazure: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
2:03:50 PM macazure: You can report issues at https://github.com/Microsoft/Oryx/issues
2:03:50 PM macazure: Oryx Version: 0.2.20230829.1, Commit: 5bd3088141516cdbd815d62ada052654e91f0429, ReleaseTagName: 20230829.1
2:03:50 PM macazure: Build Operation ID: 649d0d479f627a9d
2:03:50 PM macazure: Repository Commit : 289201ab-2c04-4863-9b68-dc3d4b0c030c
2:03:50 PM macazure: OS Type : bookworm
2:03:50 PM macazure: Image Type : githubactions
2:03:50 PM macazure: Detecting platforms...
2:03:52 PM macazure: Error: Platform 'python' version '3.8' is unsupported. Supported versions:
2:03:53 PM macazure: Error: Platform 'python' version '3.8' is unsupported. Supported versions:
2:03:53 PM macazure: /bin/bash -c "oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform nodejs --platform-version 20 -p virtualenv_name= --log-file /tmp/build-debug.log -i /tmp/8dc11aa4bf86edc -p compress_node_modules=tar-gz | tee /tmp/oryx-build.log ; exit $PIPESTATUS "
2:03:53 PM macazure: Generating summary of Oryx build
2:03:53 PM macazure: Parsing the build logs
2:03:53 PM macazure: Found 0 issue(s)
2:04:13 PM macazure: Deployment failed.
事实上,我是 Azure 初学者。我正在尝试在 Azure 中部署 Web 应用程序。但是,部署失败。我的项目使用 NodeJS Express 和 ReactJS。
我不太明白这是怎么回事,也不知道问题的原因。 发现 0 个问题,但为什么部署失败? 原因是Python吗? (但是,我的项目与Python无关)
无论如何,请帮助我找出问题所在,如果你们能提供一些解决方案,那就太好了。赞赏。
您的
VS code extension
和 terminal
导致了此问题。您可以使用 Github Actions
作为部署 Express 节点应用程序的解决方法 ,因为 Github Action 部署默认执行 zip 部署。
我创建了一个示例节点快速应用程序引用此MS Document。
命令:-
npx express-generator sidexpressapp --view ejs
cd sidexpressapp
npm install
DEBUG=sidexpressapp:* npm start
在 Visual Studio 中打开此应用程序并将其推送到 Github 存储库:-
git init
git add .
git commit -m "first message"
git remote add origin "https://github.com/sid24desai/sidexpressapp"
git push -u origin master -f
Github 存储库:-
现在,使用 Node 20 LTS 创建了一个 Azure Web 应用程序,操作系统:Linux :-
现在,
Visited Deployment> Deployment Center> Selected source: Github, GitHub Signed in as: sid24desai,Organization:githuborg, Repository:sidexpressapp, Branch:main, Build provider: Github Actions,Runtime stack: Node, Version Node 20 LTS
>保存:-
保存以上设置后 > Github Actions 部署启动并成功,请参阅以下内容:-
另一种选择是使用 zip
CLI command
部署您的 Web 应用程序,如下所示:-
az login
az webapp deploy --resource-group expresssid-rg --name expresssapp --src-path "C:\Users\xxxx\sidexpressapp.zip"