I get the following error (error.message) when I run the following shell script (myscript.sh).
myscript.sh#!/bin/bash
cd /path/to/ && node app.js
error.message
/path/to/myscript.sh: line 1: #!/bin/bash: No such file or directory
/path/to/myscript.sh: line 2: node: command not found
I have already run the following command line instructions.
command-linechmod u+x /path/to/myscript.sh
chmod u+x /path/to/app.js
Also, I know I have node installed because when I run:
node -v
I get back:
v5.5.1
I execute myscript.sh
via the following AppleScript:
do shell script "bash /path/to/myscript.sh"
Also: which bash
returns /bin/bash
What could be causing this error and how can I fix it?