I am gonna deploying react app by vscode. I clicked "Deploy to Web app" in left side of vscode with build folder this is the logs
5:01:32 PM ...: Starting deployment...
5:01:32 PM ...: Creating zip package...
5:01:32 PM ...: Ignoring files from "appService.zipIgnorePattern"
5:01:35 PM ...: Zip package size: 1.13 MB
5:02:39 PM ...: Updating submodules.
5:02:40 PM ...: Preparing deployment for commit id 'cad75485-9'.
5:02:41 PM ...: PreDeployment: context.CleanOutputPath False
5:02:41 PM ...: PreDeployment: context.OutputPath /home/site/wwwroot
5:02:41 PM ...: Repository path is /tmp/zipdeploy/extracted
5:02:41 PM ...: Running oryx build...
5:02:41 PM ...: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform nodejs --platform-version 18 -p virtualenv_name= --log-file /tmp/build-debug.log -i /tmp/8dc30e67918615e -p compress_node_modules=tar-gz | tee /tmp/oryx-build.log
5:02:42 PM ...: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
5:02:42 PM ...: You can report issues at https://github.com/Microsoft/Oryx/issues
5:02:42 PM ...: Oryx Version: 0.2.20230508.1, Commit: 7fe2bf39b357dd68572b438a85ca50b5ecfb4592, ReleaseTagName: 20230508.1
5:02:42 PM ...: Build Operation ID: 28fd5fa4b3e873ef
5:02:42 PM ...: Repository Commit : cad75485-9378-4882-bd22-0dfb357bf052
5:02:42 PM ...: OS Type : bullseye
5:02:42 PM ...: Image Type : githubactions
5:02:42 PM ...: Detecting platforms...
5:02:42 PM ...: Could not detect any platform in the source directory.
5:02:43 PM ...: Error: Couldn't detect a version for the platform 'nodejs' in the repo.
5:02:43 PM ...: /bin/bash -c "oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform nodejs --platform-version 18 -p virtualenv_name= --log-file /tmp/build-debug.log -i /tmp/8dc30e67918615e -p compress_node_modules=tar-gz | tee /tmp/oryx-build.log ; exit $PIPESTATUS "
5:02:43 PM ...: Generating summary of Oryx build
5:02:43 PM ...: Parsing the build logs
5:02:44 PM ...: Found 0 issue(s)
5:02:44 PM ...: Build Summary :
5:02:44 PM ...: ===============
5:02:44 PM ...: Errors (0)
5:02:44 PM ...: Warnings (0)
5:02:45 PM ...: Deployment Failed. deployer = ms-azuretools-vscode deploymentPath = ZipDeploy. Extract zip. Remote build.
5:03:22 PM ...: Deployment failed
.
please help me.
My azure configration is like this:
The above error indicates there is node version not specified in the repository. check the node configuration in package.json and package-lock.json. check below:
package.json:
update the version of Oryx being used in your deployment process. Newer versions might have bug fixes or improved compatibility.
I have created sample react application by using below commands.
The react application runs successfully by using
npm startcommand.By running
npm run buildcommand build folder is created in the project directory.I have selected the only build folder of react application and then deployed successfully into azure web app service. check below:
My application deployment workflow in the below:
Output: