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)

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.

In defense of the modern web

I expect I'll annoy everyone with this post: the anti-JavaScript crusaders, justly aghast at how much of the stuff we slather onto modern websites; the people arguing the web is a broken platform for interactive applications anyway and we should start over;

React users; the old guard with their artisanal JS and hand authored HTML; and Tom MacWright, someone I've admired from afar since I first became aware of his work on Mapbox many years ago. But I guess that's the price of having opinions.