Frontendroom
Tools
Categories
ShortsAbout
FUNDAMENTAL

How to change Gatsby Cloud node version?

Now a days, there are many static site generator out there in the market. One of them is GatsbyJs. It is is based upon React.

GatsbyJs provides Gatsby Cloud apart from open source framework GatsbyJs

  1. x
    1. Now Playing
      Up NextHOW TO MAKE YOUR DUVET LOOK FLUFFY - Home Decorating Tips
    2. Now Playing
      Up NextHow to fix node-sass is not Recognized as Internal and External Command Operable Program
    3. Now Playing
      Up NextHOW TO UPDATE YOUR KITCHEN CABINETS - 7 Inexpensive Kitchen Cabinet Upgrades
    4. Now Playing
      Up NextHow to Update BRAUN DigiFrame – Download Latest System Version
    5. Now Playing
      Up NextHow to Create Backup Account in INTEX Cloud Fame 4G - Enable Google Backup
    6. Now Playing
      Up NextLenovo TAB M11 Plus - How to Set Up Google BACKUP | Save All of Your Files to Google Cloud!
    7. Now Playing
      Up NextHow to Get Started with Your New Logitech G Cloud: First Setup Steps
    8. Now Playing
      Up NextHow to Change Language in GARMIN Forerunner 735XT – Switch Watch System Language
    9. Now Playing
      Up NextHow to easily download and use YT-DLP Version 2
    10. Now Playing
      Up NextSteam Deck - How To Enable & Disable Steam Cloud
x

If you want to deploy your GatsbyJs website on Gatsby Cloud, you can do so for FREE. Checkout their pricing modal here -> https://www.gatsbyjs.com/pricing/

When you deploy your site on Gatsby Cloud, if you are using npm version less than 7, then the default node version Gatsby uses is v14. If you are using npm version 7 or more, then the default Gatsby node engine version is v16.

If you want, you can define your own node engine version for Gatsby Cloud.

Change node version using .nvmrc

You can change node version for Gatsby Cloud using .nvmrc file.

Here are steps:

  1. Create .nvmrc file

First of all, create a file named .nvmrc at root of your project. If you are using terminal, then use this command to create an empty file:

touch .nvmrc
  1. Add the version in the body

Now, Add the node version in the body of the file like below. Here I have used node version 18.

v18.0.0

That's all.

Now deploy these changes to Gatsby Cloud.

In the build log, you will see that Gatsby Cloud is now using node v18.0.0 for building purposes.

Privacy Preferences

We and our partners share information on your use of this website to help improve your experience. For more information, or to opt out click the Do Not Sell My Information button below.