Generally, I make a nodejs file can execute directly with below style
#/usr/bin/env node
nodejs code here
But, when node 0.11 support generators, I try below
#/usr/bin/env node --harmony
nodejs code here
It output
/usr/bin/env: "node --harmony": No such file or directory
You can't do that, you can however use the path to node directly:
#!/usr/bin/node --harmony
There're more details on Cannot pass an argument to python with "#!/usr/bin/env python"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With