DEV Community

Kevin Woblick
Kevin Woblick

Posted on

.nvmrc or .node-version - Which one do you prefer?

There are many different version managers out there for always getting the right Node version ready for a project. This can be incredibly helpful when working with older projects which do not support a new Node version.

The most used managers are nvm, n, or nodenv. All of them let you specify a specific Node version, but how do you know which one to use for a project? Stage enter: .nvmrc and .node-version. Both contain a Node version, but are not equally supported by the different tools.

How do you define Node versions for your projects? Do you prefer using NVM with .nvmrc or nodenv with .node-version? Or do you even use a completely other approach or tool?

Top comments (1)

Collapse
 
vviikk profile image
Vikram Ramanujam

This really does my head in. In our project we basically symlinked one to the other. .nvmrc being the primary one. Honestly, there was no good reason to just not use .nvmrc. Another example of the fragmented front-end libraries and frameworks.