I've searched Stack Overflow and GitHub (for both node and nvm) for an answer, but to no avail.
In some repos (like GitHub's Atom text editor, for instance), I've come across a .node-version
file. It seems to be analogous to the .ruby-version
standard file that works with any Ruby version manager to set the current version of Ruby correctly for the project.
But as far as I can tell from its documentation, nvm (Node Version Manager) only respects a .nvmrc
file - it mentions nothing about a more general .node-version
file. And there's no mention of .node-version
in node's documentation (and I wouldn't expect there to be, since it doesn't ship with a version manager out of the box). I'm not aware of any other node version manager in heavy use.
So my question is, what is .node-version
? What tools actually use it? Is it just an alias for .nvmrc
, or am I missing something here?
There are a few version managers for node.js respecting .node-version
file:
There may be some other version managers, but I'm not aware of them.
I don't know which particular version manager Atom uses. nodenv have more stars on GitHub, but avn looks more mature and better maintained for me, not to mention its compatibility with both n and nvm.