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: \n[stdout]\n\n[stderr]\nmodule.js:549\n throw err;\n ^\n\nError: Cannot find module '/var/lib//run-command/download/2/dist/app.js'\n at Function.Module._resolveFilename (module.js:547:15)\n at Function.Module._load (module.js:474:25)\n at Function.Module.runMain (module.js:693:10)\n at startup (bootstrap_node.js:188:16)\n at bootstrap_node.js:609:3\n",
any help is appreciated?