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

Sign up to request clarification or add additional context in comments.

2 Comments

doesn't work for me (OS X El Capitan, nvm, node v7.7.0)
I ended up using /usr/local/bin/node after symlinking from nvm to that path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.