Azure App Service部署REACT JS应用程序时出现错误

时间:2020-09-11 11:32:04

标签: reactjs azure web-deployment azure-web-app-service azure-appservice

从编辑器部署到Azure应用程序服务时出错。

4:48:55 pm ppdedsrftwu2-appservice1: Starting deployment...
4:48:56 pm ppdedsrftwu2-appservice1: Creating zip package...
4:49:00 pm ppdedsrftwu2-appservice1: Zip package size: 1.09 MB
4:49:04 pm ppdedsrftwu2-appservice1: Fetching changes.
4:49:06 pm ppdedsrftwu2-appservice1: Updating submodules.
4:49:06 pm ppdedsrftwu2-appservice1: Preparing deployment for commit id '2a73dbd291'.
4:49:06 pm ppdedsrftwu2-appservice1: Repository path is /tmp/zipdeploy/extracted
4:49:06 pm ppdedsrftwu2-appservice1: Running oryx build...
4:49:06 pm ppdedsrftwu2-appservice1: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform nodejs --platform-version 10 -i /tmp/8d856447f426192 -p compress_node_modules=tar-gz --log-file /tmp/build-debug.log 
4:49:07 pm ppdedsrftwu2-appservice1: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
4:49:07 pm ppdedsrftwu2-appservice1: You can report issues at https://github.com/Microsoft/Oryx/issues
4:49:07 pm ppdedsrftwu2-appservice1: Oryx Version: 0.2.20200805.1, Commit: e7c39ede513143e9d80fd553f106f04268d770d4, ReleaseTagName: 20200805.1
4:49:07 pm ppdedsrftwu2-appservice1: Build Operation ID: |lvjLop9mFGA=.426fac1c_
4:49:07 pm ppdedsrftwu2-appservice1: Repository Commit : 2a73dbd2834715ba1fee5082d13b60
4:49:07 pm ppdedsrftwu2-appservice1: Detecting platforms...
4:49:07 pm ppdedsrftwu2-appservice1: Could not detect any platform in the source directory.
4:49:07 pm ppdedsrftwu2-appservice1: Error: Couldn't detect a version for the platform 'nodejs' in the repo.
4:49:09 pm ppdedsrftwu2-appservice1: Error: Couldn't detect a version for the platform 'nodejs' in the repo.\n/opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform nodejs --platform-version 10 -i /tmp/8d856447f4292 -p compress_node_modules=tar-gz --log-file /tmp/build-debug.log 
4:49:20 pm ppdedsrftwu2-appservice1: Deployment failed.

已经在门户中定义了所有必要的设置。

SCM_DO_BUILD_DURING_DEPLOYMENT=true
WEBSITE_NODE_DEFAULT_VERSION=12
WEBSITES_PORT=3000
WEBSITE_HTTPLOGGING_RETENTION_DAYS=7

也尝试过node10,但仍然是相同的错误。

1 个答案:

答案 0 :(得分:5)

与MS支持团队联系后,他们建议制作SCM_DO_BUILD_DURING_DEPLOYMENT= FALSE。将其设置为false后,我便可以部署该应用程序。但是奇怪的是,启用此选项后,我正在进行较早的部署,并且可以正常工作。