Cannot deploy NodeJS app from private GitHub repo

:0 1 Reputation point
2020-11-28T15:44:25.8+00:00

I am trying to deploy a Node 14 LTS web app using Azure and Kudu connected to my GitHub account for my deployment. However, when trying to deploy, it says the deployment status is failed. This is the error it shows me in "Show Logs":

"error: cannot run ssh: No such file or directory\nfatal: unable to fork\n\n/usr/bin/git fetch origin --progress"

I found a related question (https://learn.microsoft.com/en-us/answers/questions/152131/appservice-linux-amp-php74-deploy-failed-use-githu.html) that says to set SCM_ENABLE_DYNAMIC_INSTALL=false in application settings. However, when I do that, I get the following error:

"Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues
Oryx Version: 0.2.20200917.1, Commit: 59deb778658a124cb74ea8e2c8f39fa87abcc9d9, ReleaseTagName: 20200917.1
Build Operation ID: |ttXwtfbuZOo=.100e490f_
Repository Commit : 20109c2fa598b3d8445dceeb22d7083f6f08c3f9
Detecting platforms...
Error: Platform 'nodejs' version '14' is unsupported. Supported versions: 4.4.7, 4.5.0, 4.8.0, 6.2.2, 6.6.0, 6.9.3, 6.10.3, 6.11.0, 6.17.1, 8.0.0, 8.1.4, 8.2.1, 8.8.1, 8.9.4, 8.11.2, 8.12.0, 8.15.1, 8.17.0, 9.4.0, 10.1.0, 10.10.0, 10.14.2, 10.21.0, 10.22.0, 12.18.2, 12.18.3"

I have set my stack to be Node 14 during the creation of the web app, and it says Node 14 LTS in my Deployment Center settings, as well as my General Settings in Configuration.

If I try to deploy a public repository on my GitHub, it seems to work fine. I've had some various forms of success by deleting the deploy key and webhook in my GitHub repo settings, but I do not want to keep experimenting with that kind of approach. I was also able to find a successful workaround by setting SCM_DO_BUILD_DURING_DEPLOYMENT=false and a custom post-deployment script defined in SCM_POST_DEPLOYMENT_ACTIONS_PATH. However, this produces undesirable side-effects and is not viable as a long-term solution.

This seems to be an ongoing issue that multiple users have had - see here: https://twitter.com/AzureSupport/status/1324171128747761671.

Any non-convoluted solutions to this?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,931 questions
{count} votes

1 answer

Sort by: Most helpful
  1. meme 1 Reputation point
    2020-12-29T13:18:40.573+00:00

    Just setting SCM_ENABLE_DYNAMIC_INSTALL=false works. It lets kudu fetch data from github to /tmp.

    After that I was monitoring /home/site/deployment/.../log.log file
    It looked like the deployment did run "react-scripts build" (from postinstall in package.json)
    2020-12-26T20:12:59.8600243Z,> frontend@0.1.0 build /tmp/8d8a9d9e6dc5020/frontend,,0
    2020-12-26T20:12:59.8805025Z,> react-scripts build,,0
    2020-12-26T20:12:59.9019914Z,,,0
    2020-12-26T20:13:15.2793888Z,Creating an optimized production build...,,0
    Then about 10 minutes later it died with the following error:
    2020-12-26T20:22:43.8661480Z,An unknown error has occurred. Check the diagnostic log for details.,cd82047b-aac7-4f6b-813a-fcb3fe60109e,2

    Immediate after this, I checked /var/.../diagnosticLog, but there wasn't log file to look at...

    N.B. my postinstall script
    "postinstall": "cd frontend && npm install && npm run build",


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.