Thanks! As mentioned by HarshithaVeeramalla-MT the issue resolved after deploying via Github Actions with default scripts and specifying directory with application build and using npx serve -s build/
in startup command.
React App fails after deploy to Azure App Service
Hey
I build React App and deploy it to Linux Plan at Azure App Service.
I have 2 versions of service at 2 different Service Plans.
After some changes at code, I tried to deploy it to one of the Plans and it can't start/
Locally it works normally.
But at the server I got this message ":( Application Error";
I deploy application by Visual Studio Code but got same problem with Github Actions.
At log files, I found this
Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
Could not find operation ID in manifest. Generating an operation id...
Looks strange, because on the second Service Plan I have this file and this version worked.
Second message on logs
npm start
npm info it worked if it ends with ok
npm info using npm@6.14.14
npm info using node@Valentina .22.4
pm info lifecycle backup-resurge@0.1.0~prestart: backup-resurge@0.1.0
npm info lifecycle backup-resurge@0.1.0~start: backup-resurge@0.1.0
backup-resurge@0.1.0 start /home/site/wwwroot
react-scripts start
/home/site/wwwroot/node_modules/.bin/../node/bin/node: 1: /home/site/wwwroot/node_modules/.bin/../node/bin/node: This: not found
npm info lifecycle backup-resurge@0.1.0~start: Failed to exec start script
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! backup-resurge@0.1.0 start: react-scripts start
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the backup-resurge@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm timing npm Completed in 1606ms
But I think that's file exists
Does anyone know what I can try to solve this problem?
1 answer
Sort by: Most helpful
-
SnehaAgrawal-MSFT 21,431 Reputation points
2021-12-27T11:05:47.637+00:00