This file instructs NodeJS version managers (such as avn and nodenv, and I guess that there are more) - which node version to use.
However, I have not been able to find anywhere, which format this file should abide to.
For example, should it be a JSON file? And if yes, what keys and values should it contain?
Running node --version gives me v8.11.2.
Also, where exactly should I place this file? My hunch tells me that it should reside next the package.json file in each one of my repositories, is that correct?
The .node-version file is read by multiple projects, but there is not a defined standard.
In my testing, the format that worked with every product is a three part version number on a single line with a unix line ending.
e.g.
8.11.2
I documented usage and some supported features here: https://github.com/shadowspawn/node-version-usage
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With