I created my node script executable for some grunt tasks. On Windows, my node script works fine. But on Mac OS X (Yosemite) it does not work.
My node script is published on Windows.
My node script is installed via the npm command:
npm install -g task-app
My node script has this first line:
I tried many solutions to solve my problem, but I am still stuck.
These are the solutions I used:
- uninstall and reinstall Node.js
- run this command to create a link for node: sudo ln -s / usr / bin / nodejs / usr / local / bin / node
- set my path with this command: export PATH = $ PATH: / usr / local / bin / node
Do you have other solutions?
EDIT:
beginning of my script:
#! /usr/bin/env node var grunt = require('grunt'); //Get parameters from command line var args = process.argv.splice(2); [...]
Paulodev
source share