How To Upgrade or Downgrade the Node Version?

How To Upgrade or Downgrade the Node Version?

Hi Techies…😎 Here is a mini blog post for you. Now, the latest Angular version is Angular 15. And…., LTS v18.13.1 is the latest stable node version. But, if you are working on Angular 14, the latest node version is unsupported.

angular cli

🟣 Node v18.13.0 (LTS) was released on 2023–01–06, so it was after the release of Angular 15.0.0 (2022–11–16). As a consequence Angular 15.0.0 only guarantees compatibility with Node 18.10.x.

So……, What we can do is….searching for a compatible node version for Angular 14🤗.

🟢 Here is the link to angular-cli-node-js-typescript-rxjs-compatibility-matrix.csv

Steps to downgrade node version:

🔹 Run command prompt as administrator.

🔹 Then, check the installed node version by using node -v.

🔹 Now, you have to install nvm. You can download NVM executable file (nvm-setup.exe) by this Link and install it on your machine.

📋 What is NVM?

  • NVM, short for Node Version Manager, is a command line tool for managing and switching to different versions of Node.js.

🔹 Then for Windows and nvm, the command is: nvm install <version>.

🔹 Now you have to check the nvm list installed on your machine. To that run nvm list in your command prompt.

🔹 After that, it shows which version is “Currently using a 64-bit executable”.

🔹 Then you can switch it to the version that you are expecting by nvm use <version>.

🔹 Now command prompt will show as below,

📌 Command prompt:

C:\Users\Acer>nvm -v
1.1.10

C:\Users\Acer>nvm install v16.10.0
Downloading node.js version 16.10.0 (64-bit)...
Extracting node and npm...
Complete

C:\Windows\system32>nvm list
    18.12.1
    16.16.0
    16.10.0
  * 14.17.3 (Currently using 64-bit executable)

C:\Windows\system32>nvm use 16.16.0
Now using node v16.16.0 (64-bit)

C:\Windows\system32>node -v
v16.16.0

C:\Users\Acer>nvm list
    18.12.1
  * 16.16.0 (Currently using 64-bit executable)
    16.10.0
    14.17.3
  • Now, you can see * 16.16.0 (Currently using 64-bit executable).

📋 What is Node.js?

“ Node.js® is an open-source, cross-platform JavaScript runtime environment.”

To install: Node.js

[18.13.0 LTS is recommended you to download because the stability is higher than the current node version with the latest features ]

📋 What is npm?

“npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently*. It is extremely configurable to support a wide variety of use cases. Most commonly, it is used **to publish, discover, install, and develop node programs.”*

🔷 Upgrade — “An upgrade is a whole new version of the software that represents a significant change or major improvement.”

🔷 Downgrade“Downgrading refers to reverting software (or hardware) back to an older version*; **downgrade is the opposite of upgrade**. Programs may need to be downgraded to remove introduced bugs, restore useful removed features, and increase speed and/or ease of use.”*

I think now you can upgrade or downgrade node versions installed in your machines.😎

A mini blog should be a mini blog… 😜. Hope to see you soon with another important topic. If you need further clarification please put a comment…

So…., Good Byee…👋👋👋👋