Use nodenv
nodenv is similar to:
virtualenvfor Pythonrbenvfor Rubyrvmalso for Rubyplenvfor Perlperlbrewalso for Perl
And of course:
nvm
Which is also for NodeJS.
It lets use install several Node versions in parallel. Which has several benefits:
- You do not have to rely on a system controlled and installed toolchain
- You can possibly specify specific versions for projects/repositories
- It is very easy to reinstall if something goes haywire