FAQ - How to downgrade Node.Js

It has been noticed that Node.js version higher that 11.x do usually result in bugs when interacting with Truffle.
Here is a guide to downgrade your Node.js to a verified version.
This guide is for Windows / MacOs / Linux users.

Windows

||||| Verify Node.Js version |||||

  • Open Windows PowerShell;
  • Type node -v;

The Node.Js version installed on your machine will be displayed as per screenshot below.

Schermata 2020-09-09 alle 10.32.28

If the version is higher than 11.x proceed as follow to downgrade it.

||||| Uninstall Node.Js |||||

  • Open control panel > select node and click uninstall ;

  • Verify that Node has been uninstalled by typing node -v you should see something like this:

||||| Install Node.Js 10.21.0 |||||

  • Click HERE
  • Download the .msi file (based on your computer).
    If you do not know which one to choose, try to download and install node-v10.21.0-x64.msi first , if that does not open download and install node-v10.21.0-x86.msi
  • Type node -v, you should now see that version: 10.21.0 is installed.


Mac Os

||||| Verify Node.Js version |||||

  • Open the Terminal;
  • Type node -v;

The Node.Js version installed on your machine will be displayed as per screenshot below.

Schermata 2020-09-21 alle 12.43.02

If the version is higher than 11.x proceed as follow to downgrade it.

||||| Downgrade Node.Js to 10.21.0 |||||

  • Click node-v10.21.0.pkg, it will trigger the download of Node.Js v 10.21.0;
  • Proceed with the installation.
  • Type node -v, you should now see that version: 10.21.0 is installed.


Linux

||||| Verify Curl |||||

  • Open the Terminal;
  • Type curl, if you see "command ‘curl’ not found’ type sudo apt install curl.

Schermata 2020-09-21 alle 15.39.45

||||| Verify NVM |||||

  • Open the Terminal;
  • Type nvm

If the terminal returns “nvm command not found” type:
curl https://raw.githubusercontent.com/creationix/nvm/v0.25.0/install.sh | bash

Close and reopen the Terminal.

||||| Verify Node.Js version |||||

  • Open the Terminal;
  • Type node -v;

The Node.Js version installed on your machine will be displayed as per screenshot below.

Schermata 2020-09-21 alle 14.43.47

If the version is higher than 11.x proceed as follow to downgrade it.

||||| Downgrade Node.Js to 10.21.0 |||||

  • Type nvm install 10.21.0



Happy learning,
Dani

11 Likes