Kudu Script: remote: select node version failed

Copper Contributor

It feels like Kudu doesn't want me to deploy my node.js app to Azure. I have done every thing.

Set WEBSITE_NODE_DEFAULT_VERSION on Application Settings in Portal

added "node": "12.16.3" to package.json

az webapp config show xxxx --query linuxFxVersion shows "NODE|12-lts"

 

Still when I push my code to azure (git push azure master) I get the following log

Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 311 bytes | 311.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Deploy Async
remote: Updating branch 'master'.
remote: Updating submodules.
remote: Preparing deployment for commit id '0f3accad99'.
remote: Running custom deployment command...
remote: Not setting execute permissions for bash deploy.sh
remote: Running deployment command...
remote: ENOENT: no such file or directory, open '/opt/nodejs/12.16.3/npm.txt'
remote: Handling node.js deployment.
remote: Kudu sync from: '/home/site/repository' to: '/home/site/wwwroot'
remote: Ignoring: .deployment
remote: Ignoring: deploy.sh
remote: Copying file: 'package.json'
remote: Ignoring: .git
remote: Detecting node version spec...
remote: Using package.json engines.node value: 12.16.3
remote: Node.js versions available on the platform are: 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.16.3, 10.19.0, 12.16.3, 14.0.0.
remote: Resolved to version 12.16.3
remote: Detecting npm version spec...
remote: An error has occurred during web site deployment.
remote: select node version failed

Here's what baffles me. from the logs

1. Ignoring scriipt

remote: Ignoring: .deployment
remote: Ignoring: deploy.sh

I read somewhere that this may happen if i edited the file. I deleted what i typed and regenerated it. Still I get this issue

 

2. Node version remote: Using package.json engines.node value: 12.16.3

remote: Resolved to version 12.16.3

remote: Detecting npm version spec...

remote: An error has occurred during web site deployment.

remote: select node version failed

 

Why did it fail? I am at a loss. I don't know how to proceed.

1 Reply

@jijodevsame problem here, I still looking for a solution, there's also an issue opened two years ago on kudu on github, and there's no answer. I think the best thing to do is to moving away from azure app service and using something more reliable.

https://github.com/projectkudu/kudu/issues/2870#issuecomment-443464291