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 script has been published on Windows.
My node script is installed via npm command :
npm install -g task-app
My node script have this first line :
#! /usr/bin/env node
I tried many some solutions to solve my problem but I'm still stuck.
Here's these solutions that I used :
Do you have other solutions to propose ?
EDIT :
the beginning of my script :
#! /usr/bin/env node
var grunt = require('grunt');
//Get parameters from command line
var args = process.argv.splice(2);
[...]
After all, I found the solution to my problem.
As my node script file has been created on Windows, the file is DOS format (line endings in DOS format I think). So, I used a module which allow to converting a file to a unix format :
brew install dos2unix
sudo dos2unix /usr/local/lib/node_modules/task-app/src/task-app.js