I am attempting to create a shell script using Node.js similar to packages like express and mocha. My initial test reported command not found so I backed the script to the following:
#!/usr/bin/env node
console.log("printing stuff");
The above should just output “printing stuff” when ran; however, that too doesn’t work.
I’m attempting to execute the script via ./script in the directory of the file in order to ensure it’s not a pathing issue. Attempting to execute under a privileged state (i.e. sudo) yields the same results/error message.
Any idea what I need to do?
Figured out my issue. I made the shell script but forgot to set execute permissions onto the file. doing a
chmod a+x scriptresolved the issue.