6

I'm using nvm to manage my node versions. My node.js executable files used to be sha bang'ed like so #! /usr/local/bin/node but now it seems like I would have to do something like #! /Users/<userName>/.nvm/versions/node/v6.3.1/bin/node to accomplish the same thing.

What's the best way to handle this?

1

1 Answer 1

3

I am using #!/usr/bin/env node in my node executable and it seems to work. There is a reference here https://en.wikipedia.org/wiki/Shebang_(Unix)#Portability

2
  • doesn't work for me (OS X El Capitan, nvm, node v7.7.0)
    – elquimista
    Commented Mar 15, 2017 at 13:39
  • I ended up using /usr/local/bin/node after symlinking from nvm to that path
    – elquimista
    Commented Mar 15, 2017 at 13:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.