.node-version file or
NODE_VERSION env var; and similarly use
NPM_VERSION to set the npm version, and
YARN_VERSION to set the yarn version.
The standard way to define these (in any Node project) is via the
engines key in
package.json – see https://docs.npmjs.com/files/package.json#engines
The approach you’re using can lead to a situation where the Node, npm and/or yarn versions used on the developer’s machine are not the same as in a Netlify build, leading to build failures or strange variation.
Don’t Repeat Yourself – this info should be in only one place. It would be better to use the package.json mechanism. If that can’t be done, it would make sense to add a prominent warning to your doc page that I referenced about to say the standard Node approach is IGNORED.