After downloading Node.js for MAC OS from this link: http://nodejs.org/download/ (http://nodejs.org/dist/v0.10.29/node-v0.10.29.pkg), I needed to execute a JavaScript on Google Chrome. To do this, I utilized the following AppleScript code:
do shell script "supervisor \"/Applications/xyz.js\""
However, executing the above code resulted in the error message:
error "sh: supervisor: command not found" number 127
Surprisingly, running the same syntax through Terminal worked perfectly fine:
supervisor /Applications/xyz.js