Moodle On Azure App Service Deployment Fails Due to node.js Version

Moodle On Azure App Service Deployment Fails Due to node.js Version

door Argun T -
Aantal antwoorden: 6

Hello All,

I have been using moodle on Microsoft Azure App Service for a very long time. When I tried to deploy the latest versions of 3.9 and 3.10 by pulling the code from git, I realized the deployment failed because of the node.js version dependencies (>=14.18.0<15). Azure App Service has the following node.js versions: 

14.16.0, 16.9.1 (you can find the full list below)

Here are the errors logged:

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling node.js deployment.
Creating app_offline.htm
KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
Deleting app_offline.htm
Looking for app.js/server.js under site root.
Missing server.js/app.js files, web.config is not generated
Node.js versions available on the platform are: 0.6.20, 0.8.2, 0.8.19, 0.8.26, 0.8.27, 0.8.28, 0.10.5, 0.10.18, 0.10.21, 0.10.24, 0.10.26, 0.10.28, 0.10.29, 0.10.31, 0.10.32, 0.10.40, 0.12.0, 0.12.2, 0.12.3, 0.12.6, 4.0.0, 4.1.0, 4.1.2, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.3.0, 4.3.2, 4.4.0, 4.4.1, 4.4.6, 4.4.7, 4.5.0, 4.6.0, 4.6.1, 4.8.4, 5.0.0, 5.1.1, 5.3.0, 5.4.0, 5.5.0, 5.6.0, 5.7.0, 5.7.1, 5.8.0, 5.9.1, 6.0.0, 6.1.0, 6.2.2, 6.3.0, 6.5.0, 6.6.0, 6.7.0, 6.9.0, 6.9.1, 6.9.2, 6.9.4, 6.9.5, 6.10.0, 6.10.3, 6.11.1, 6.11.2, 6.11.5, 6.12.2, 6.12.3, 7.0.0, 7.1.0, 7.2.0, 7.3.0, 7.4.0, 7.5.0, 7.6.0, 7.7.0, 7.7.4, 7.10.0, 7.10.1, 8.0.0, 8.1.4, 8.4.0, 8.5.0, 8.7.0, 8.8.0, 8.8.1, 8.9.0, 8.9.3, 8.9.4, 8.10.0, 8.11.1, 8.17.0, 10.0.0, 10.6.0, 10.14.1, 10.15.2, 10.16.3, 10.19.0, 12.13.0, 12.15.0, 12.18.0, 12.21.0, 14.10.1, 14.15.0, 14.15.1, 14.16.0, 16.9.1.
No available node.js version matches application's version constraint of '>=14.18.0 <15'. Use package.json to choose one of the available versions.
An error has occurred during web site deployment.
Missing server.js/app.js files, web.config is not generated\r\nNo available node.js version matches application's version constraint of '>=14.18.0 <15'. Use package.json to choose one of the available versions.\r\nD:\Program Files (x86)\SiteExtensions\Kudu\94.30524.5227\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

Please advise.

Many Thanks and Regards.

{"nodejs":[
{"version":"0.10.40","npm":"1.4.28"},{"version":"0.10.5","npm":"1.2.18"},{"version":"0.12.6","npm":"2.11.2"},{"version":"0.6.20","npm":"1.1.37"},
{"version":"0.8.28","npm":"1.2.30"},{"version":"10.14.1","npm":"6.4.1"},{"version":"10.15.2","npm":"6.4.1"},{"version":"10.16.3","npm":"6.9.0"},
{"version":"10.19.0","npm":"6.13.4"},{"version":"10.6.0","npm":"6.1.0"},{"version":"12.15.0","npm":"6.13.4"},{"version":"12.18.0","npm":"6.14.4"},
{"version":"12.21.0","npm":"6.14.11"},{"version":"14.15.1","npm":"6.14.8"},{"version":"14.16.0","npm":"6.14.11"},{"version":"16.9.1","npm":"7.21.1"},
{"version":"4.8.4","npm":"2.15.11"},{"version":"6.12.3","npm":"3.10.10"},{"version":"6.5.0","npm":"3.10.3"},{"version":"6.9.1","npm":"3.10.8"},
{"version":"6.9.5","npm":"3.10.10"},{"version":"7.10.1","npm":"4.2.0"},{"version":"8.10.0","npm":"5.6.0"},{"version":"8.11.1","npm":"5.6.0"},
{"version":"8.17.0","npm":"6.13.4"},{"version":"8.9.4","npm":"5.6.0"}]

Gemiddelde van de beoordelingen:  -
Als antwoord op Argun T

Re: Moodle On Azure App Service Deployment Fails Due to node.js Version

door Howard Miller -
Foto van Core developers Foto van Documentation writers Foto van Particularly helpful Moodlers Foto van Peer reviewers Foto van Plugin developers
There's probably something significant that I don't know anything about.... but why do you need node to install (deploy?) Moodle?

For the record, I know zero/nothing about Azure or Windows. 
Gemiddelde van de beoordelingen:  -
Als antwoord op Howard Miller

Re: Moodle On Azure App Service Deployment Fails Due to node.js Version

door Argun T -
I wish I knew droevig This has nothing to do with Azure. If you pull the code from github or download the zip file from moodle you will see the following lines in the package.json file:

"engines": {
"node": ">=14.18.0 <15"
}

I found this https://docs.moodle.org/dev/NPM while searching...
Gemiddelde van de beoordelingen:  -
Als antwoord op Argun T

Re: Moodle On Azure App Service Deployment Fails Due to node.js Version

door Howard Miller -
Foto van Core developers Foto van Documentation writers Foto van Particularly helpful Moodlers Foto van Peer reviewers Foto van Plugin developers
You don't need node to install (deploy?) Moodle. Follow the installation instructions.

You only need that stuff for some development activities.
Gemiddelde van de beoordelingen:  -
Als antwoord op Argun T

Ri: Moodle On Azure App Service Deployment Fails Due to node.js Version

door Sergio Rabellino -
Foto van Particularly helpful Moodlers Foto van Plugin developers
Are you deploying Moodle or another (node) app ? It seems that your deploy.cmd it's going to deploy a node.js app, which is surely not a Moodle one ...
Gemiddelde van de beoordelingen:  -
Als antwoord op Sergio Rabellino

Re: Ri: Moodle On Azure App Service Deployment Fails Due to node.js Version

door Argun T -
I am deploying only moodle from github. The following line is from the package.json file:

"engines": {
"node": ">=14.18.0 <15"
}
Gemiddelde van de beoordelingen:  -
Als antwoord op Argun T

Ri: Re: Ri: Moodle On Azure App Service Deployment Fails Due to node.js Version

door Sergio Rabellino -
Foto van Particularly helpful Moodlers Foto van Plugin developers
The package.json is useful only if you are developing/modifying some js scripts, but should be ignored for normal usage, as moodle runs on top of PHP (I believe...).
It's your deploy tool that (I think erroneously) thinks that you are deploying a node app only because a packages.json is present.
Gemiddelde van de beoordelingen:  -