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?
Instead of using npm to install and uninstall Node versions for your different projects, you can use nvm, which helps you effectively manage your node versions for each project.
We recommend using a version manager as versions change very quickly. You will likely need to switch between multiple Node. js versions based on the needs of different projects you're working on. Node Version Manager, more commonly called nvm, is the most popular way to install multiple versions of Node.
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
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