Closed raph90 closed 6 months ago
Same issue here, any help appreciated.
I am also having the same issue
Same issue here, we're trying to use node 18 for our custom deploy scripts which runs yarn install. However the packages we use require node version >= 16 since node 14 is now deprecated.
Hi @raph90 can you please check if you have this Env variable "SCM_SCRIPT_GENERATOR_ARGS" in your app settings and remove it before retrying?
Unfortunatly we do see this problem now as well. We didn't touch a thing. Latest success was in 2023-01, but when we tried our next deploy in 2023-07 we do run into troubles...
remote: /opt/Kudu/KuduConsole/Scripts/selectNodeVersion.js:166
remote: throw new Error('Unable to locate node.js installation directory at ' + nodejsDir);
remote: ^
remote:
remote: Error: Unable to locate node.js installation directory at /opt/nodejs
remote: at Object.<anonymous> (/opt/Kudu/KuduConsole/Scripts/selectNodeVersion.js:166:11)
remote: at Module._compile (internal/modules/cjs/loader.js:1085:14)
remote: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
remote: at Module.load (internal/modules/cjs/loader.js:950:32)
remote: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
remote: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
remote: at internal/main/run_main_module.js:17:47
remote: Deployment Failed. deployer = deploymentPath =
we build and run on linux and try to find an (easy) way to ship our code from a jenkins-pipeline to azure function-app-runtime. git push was working from 2022-06(last time we had to overhaul our pipeline) until at least 2023-01
Hi @pniederlag can you please check if you have this Env variable "SCM_SCRIPT_GENERATOR_ARGS" in your app settings and remove it before retrying?
I found this to be part of .deployment in the repository and now have dropped it. Seems to help for me. Thx.
diff --git a/.deployment b/.deployment
index 33a38ed..8d17029 100644
--- a/.deployment
+++ b/.deployment
@@ -1,2 +1 @@
[config]
-SCM_SCRIPT_GENERATOR_ARGS=--node
Glad that it helped @pniederlag. Let us know if we can close this.
@sgollapudi77 my problem seems solved @raph90 was original reporter, I have no clue wether he found a way to get his problem solved.
I'm hitting the same issue with a fresh App Service instance and the default custom deployment script for node.
Reproduction repo here.
Hi, we did solve this somehow. I really can't remember the full steps but we did create a .deployment file with this content:
[config] SCM_SCRIPT_GENERATOR_ARGS=--basic SCM_DO_BUILD_DURING_DEPLOYMENT=false ENABLE_ORYX_BUILD=false WEBSITE_NPM_DEFAULT_VERSION=6.14.15 command = bash deploy.sh
and we did change the deploy.sh by removing the selectNodeVersion line and adding these two lines:
# selectNodeVersion NPM_CMD=npm NODE_EXE=node
Now it works for us.
Maybe that helps someone here...
Hi
If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure: https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request
This way we can better track and assist you on this case
Thanks,
Joaquin Vano Azure App Service
Deployment via Github Actions for an Azure web app fails on linux.
Here are my files:
deploy.sh:
.deployment:
My Github action:
And then the output I get:
The issue is that nodejs does not exist inside of /opt on the machine. I don't know how to get it there, or why it's not there, but I've experimented with new installs for node 18-lts and can confirm that with a new Azure Web App install this does not work.
Any help would be appreciated!