ElianCodes

← Back to blog

Set your NodeJS version in Netlify

A couple of times I needed to fix the NodeJS version on a Netlify site, I found myself googling it a couple of times, so this little how-to is basically a note-to-self.

The solution to setting a fixed NodeJS version is actually quite easy:

  1. go to your desired website
  2. go to Site Settings
  3. under Build & deploy
  4. scroll down to Environment
  5. add a new environment variable named NODE_VERSION
  6. set it to your desired version (major or minor)

setting the Node version environment variable in Netlify

When you set it to 16, it will automatically use the latest 16.xx.xx.

More information over on the Netlify documentation

Written by Elian Van Cutsem

← Back to blog