We all switch around different projects, sometimes even daily. Every project has its own requirements in terms of dependencies and runtime. Lucky f...
For further actions, you may consider blocking this person and/or reporting abuse
A few extra pointers:
brew install nvm
), and it's one less separate update to manage (just update it with the rest of your brew packages).brew install node@[version]
on Mac and Linux, or from your Linux distro's repository, or from the official NodeSource deb or rpm repo). For everyday use, set NVM to use this version withnvm use system
. The benefit of this is not having to redo your global node_modules for every new point release (and not needing to worry about either uninstalling previous ones or having several stale node_modules folders), as well as not needing to install yarn (e.g. via Homebrew) only to follow up by removing the Node it pulls down as a dependency. From there, when you need a specific NVM-provided version of Node, just donvm use [version]
or, even better, specify it in your project with a .nvmrc file.Check out asdf version manager.
A lot more fiddly but oh-so-much more powerful.
On other alternatives to nvm I found Volta (github.com/volta-cli/volta) I haven't tried it personally but seems like a good alt
I love the simplicity of NVM. But never heard of asdf
Nvm is for sure a cool tool, the version switching functionality is great.
I’ve skimmed through docs but couldn’t find this - Does nvm have a feature to install and compile node from source?
I'm not familiar with such feature. Why would you need it?
Compiling from source (as opposed to using pre-compiled binaries) is considered by some to be more secure.
Great article!
I personally use nvm and it is really helpful between switching the latest and LTS version.
Thanks. Yeah, it's super cool!
One of my fav tools ever is tj/n. N is so much easier and more reliable than NVM. It is also somewhat more intelligent. Only downside is it's OSX-only tool.
👏👍