I have created my node script executable to execute some tasks grunt. On Windows, my node script works fine. But on Mac OS X (Yosemite), it\'s not working.
My node scri
As PauloDev says above, this is a Mac/Windows line ending issue. To elaborate, if you are using nvm
you'll need to locate your script first (in my case I'm using express-mvc-generator
):
# install dos2unix
brew install dos2unix
# output the full path of your node version
which node
>> /Users//.nvm/versions/node/v8.0.0/bin/node
# confirm the file path
cat /Users//.nvm/versions/node/v8.0.0/lib/node_modules/express-mvc-generator/bin/express
# convert the line endings
sudo dos2unix /Users//.nvm/versions/node/v8.0.0/lib/node_modules/express-mvc-generator/bin/express
# then run your script