The site currently runs on Node.js v12, the Active LTS version that will be supported until 2020-10-20.
When updating to a new Node.js version, consider the following files:
- The
engines.node
entry inpackage.json
- The
.node-version
file used by nodenv, a tool for managing multiple Node.js versions on your machine. - The
.github/*.workflow
Actions files - The
Dockerfile
that can be used for deployments - This README!
nodenv is a tool for managing multiple Node.js versions on your local machine. It is not required to run the docs-internal app, but you may already have it installed if you've worked on other internal GitHub projects that use Node.js.
To install Node.js 12 and make it your default version, run this command:
nodenv install 12.8.0 && nodenv global 12.8.0
You may sometimes see a warning when running npm scripts with nodenv:
npm WARN lifecycle The node binary used for scripts is [...] but npm is using [...]
This is due to nodenv's overriding behavior. To silence this harmless warning, the nodenv docs recommend running the following command from any directory:
npm config set scripts-prepend-node-path auto