I have hosted a nodejs app on azure linux. Now, I am trying to run command from my machine to invoke node js cli command. I am looking for an ability to run the script from my local machine on server.
I am trying
az vm run-command invoke -g xxx -n yyy --command-id RunShellScript --scripts “NODE_ENV_VAR_LIST node dist/app.js arg1 “
Output , it say provisioning is successful but throw error while running
"Enable succeeded:
[stdout]
[stderr]
module.js:549
throw err;
^
Error: Cannot find module '/var/lib//run-command/download/2/dist/app.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
",
any help is appreciated?
question from:https://stackoverflow.com/questions/65835232/azure-command-line-script-to-run-node-js-command