IE, Adding to the articles shared by Thameur-BOURBITA.
On App Service, Error: Couldn't detect a version for the platform 'nodejs' in the repo.
Possible reason for this error:
The Node.js toolset is run when the following conditions are met:
One of these files is found in the root of the repo:
- package.json
- package-lock.json
- yarn.lock
One of these files is found in the root of the repo:
If Oryx is not finding any condition met then it will not detect any platform or nodejs version, check reference for more information.
** Kindly try these steps to isolate the issue:**
-Review if your files are in root folder when doing git commits and if there is any
package.json/yarn.lock
and you have any application files like app.js, server.js
to detect a valid Node.js application.
- When doing
ZipDeploy
and using Oryx build
check if file directories are correct inside the zip file and not having a subdirectory.
If the issue still persist, please try these steps:
- You may always leverage App Service diagnostics from Azure Portal> Navigate to your App Service app in the Azure Portal.
- In the left navigation, click on
Diagnose and solve problems
- Review and run - "Configuration and Management” and “Availability and Performance”
Ref: Troubleshooting Node.js deployments on App Service Linux
Kindly let us know, I'll follow-up with you further.