I am trying to execute sudo command inside a bash script.
#!/bin/bash
sudo node app.js
and it throws me :
sudo: node: command not found
If I try to execute only node app.js (without sudo ),it runs ok.
If I try to just run sudo -h
, it prints the sudo help.
But , when I am trying the sudo node app.js
it throws me the error.