Hi @Chandan Datta
Thanks for the question and using MS Q&A platform.
apologize for any inconvenience caused on this.
The error message Error: Couldn't detect a version for the platform typically indicates that the Oryx build process is unable to identify the Node.js version specified for your application. This can happen if the package.json
file is missing or if it does not specify a valid Node.js version.
To resolve this issue, ensure that your package.json
file is correctly configured and includes a valid engines field that specifies the Node.js version.
1.Set Node.js Version:
Set the WEBSITE_NODE_DEFAULT_VERSION app setting to a stable version (like 16.x) using the Azure CLI:
az webapp config appsettings set --name <app-name> --resource-group <resource-group-name> --settings WEBSITE_NODE_DEFAULT_VERSION="16"
2.Ensure All Dependencies Are Included:
If using TypeScript or other build tools, ensure that all necessary compiled files are included in your deployment package.
references:
https://learn.microsoft.com/en-us/azure/app-service/configure-language-nodejs?pivots=platform-windows#troubleshooting
https://learn.microsoft.com/en-us/azure/static-web-apps/troubleshooting#retrieve-deployment-error-messages