banner



How To Install Latest Version Of Node

Node.js is a pop open up-source, cross-platform server-side surroundings for building robust applications. Since a vibrant community of contributors backs it, the platform is continuously updated to innovate new features, security patches, and other performance improvements.

So, updating to the latest Node.js version can assist yous to make the near of the engineering science. You can decide to work with the Long-term Supported (LTS) version or the Electric current version that comes with the latest features.

Typically, LTS is recommended for most users because it is a stable version that provides predictable update releases likewise every bit a slower introduction of substantial changes.

In this commodity, you volition larn how to quickly and easily update Node.js on dissimilar operating systems—macOS, Linux, and Windows.

Every bit we'll demonstrate, there are many means of updating to the next version of Node.js. And so, you can cull the option that best meets your arrangement requirements and preferences.

Checking your version of Node.js

Before getting started, you can check the version of Node.js currently deployed on your system by running the post-obit command on the terminal:

or (shortened method):

Let's now talk about the different ways on how to update Node.js.

one. Updating using a Node version managing director on macOS or Linux

A Node version manager is a utility that lets you install different Node.js versions and switch flawlessly between them on your machine. Y'all tin can also use it to update your version of Node.js.

On macOS or Linux, you can use either of the following Node version managers:

  • nvm
  • n

Let's talk near each of them.

a) nvm

nvm is a script-based version director for Node.js. To install it on macOS or Linux, you can employ either Wget or roll.

For Wget, run the post-obit command on the terminal:

wget -qO- https: //raw.githubusercontent.com/nvm-sh/nvm/v0.35.iii/install.sh | fustigate

For cURL, run the post-obit:

roll -o- https: //raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

The in a higher place commands assume that you're installing nvm version 0.35.three. And so, you'll need to check the latest version earlier installing it on your machine.

With these commands, y'all tin can clone the repository to ~/.nvm . This style, you can make changes to your bash profile, allowing you to admission nvm arrangement-wide.

To ostend if the installation was successful, y'all can run the following command:

If everything went well, it'd output nvm .

Next, you can simply download and update to the latest Node.js version by running the following:

Annotation that node refers to an allonym of the latest Node.js version.

You tin besides reference LTS versions in aliases as well as . nvmrc files using the notation lts/* for the most recent LTS releases.

Hither is an case:

If yous want to install and upgrade to a specific version, you can run the post-obit:

  nvm install <version-number>

For example, if you want to update Node.js to version 12.xviii.iii, you tin can run:

After the upgrade, you lot can set that version to be the default version to use throughout your system:

You can see the listing of installed Node.js versions past running this command:

Also, you tin can come across the list of versions available for installation by running this command:

b) n

n is another useful Node version manager you tin use for updating Node.js on macOS and Linux.

Since it's an npm-based packet , if you already have Node.js available on your environs, you lot tin just install it by running this command:

Then, to download and update to your desired Node.js version, execute the following:

For example, if you want to update Node.js to version 12.18.3, you can run:

To run across a listing of your downloaded Node.js versions, run n on its own:

You can specify to update to the newest LTS version by running:

Y'all can also specify to update to the latest electric current version by running:

You can specify to update to the newest LTS version past running:

2. Updating using a Node version manager on Windows

On Windows, you tin can apply the following Node version director:

  • nvm-windows

Permit's talk about it.

a) nvm-windows

nvm-windows is a Node version direction tool for the Windows operating arrangement. While it'south not the same equally nvm , both tools share several usage similarities for Node.js version management.

Before installing nvm-windows , it'due south recommended to uninstall any available Node.js versions from your car. This will avoid potential disharmonize issues during installation.

Next, you tin can download and run the latest nvm-setup.zilch installer.

Also, since the utility runs in an Admin vanquish, yous'll demand to begin the Command Prompt or Powershell as an Administrator before using it.

If you want to install and upgrade to a specific version, you can run the post-obit:

Yous can specify to update to the newest LTS version by running:

nvm install <version-number>

For example, if you want to update Node.js to version 12.18.iii, yous can run:

After the upgrade, you can switch to that version:

You tin also specify to update to the latest stable Node.js version:

You can see the list of installed Node.js versions by running this control:

Also, yous can come across the list of versions available for download by running this command:

3. Updating using a Node installer on Linux

Using a Node installer is the least recommended manner of upgrading Node.js on Linux. Nevertheless, if it's the just road you can use, then follow the following steps:

  • Go to the official Node.js downloads site , which has different Linux binary packages, and select your preferred built-in installer or source lawmaking. Y'all can choose either the LTS releases or the latest current releases.
  • Download the binary package using your browser. Or, y'all can download it using the following Wget command on the terminal:

Wget command on the terminal

  • Download the binary package using your browser. Or, you can download information technology using the following Wget command on the concluding:
wget https: //nodejs.org/dist/v12.18.three/node-v12.xviii.3-linux-x64.tar.xz

Remember to change the version number on the Wget command depending on the one you want.

  • Install the xz-utils utility using the following control:
sudo apt-get install xz-utils

This utility will be used for unpacking the binary parcel.

  • Finally, run the following command to unpack and install the binary packet on usr/local:
tar -C /usr/local -strip-components one -xJf node-v12 .18.3 -linux-x64.tar.xz

4. Updating using a Node installer on macOS and Windows

Another fashion of updating your Node.js on macOS and Windows is to go to the official download site and install the virtually recent version. This way, information technology'll overwrite your existing sometime version with the latest i.

You can follow the following steps to update it using this method:

  • On the Node.js download page, select either the LTS version or the latest current version.

On the Node.js download page, select either the LTS version or the latest current version

  • Depending on your system, click either the Windows Installer pick or the macOS installer option.
  • Run the installation wizard. It will magically consummate the installation process and upgrade your Node.js version by replacing it with the new, updated one.

5. Updating using Homebrew on macOS

Homebrew is a popular package direction utility for macOS.

To use it for installing Node.js, run the following command on your macOS terminal:

Later on, if you'd like to update it, run the post-obit commands:

mash update #ensure Homebrew is upwards to date first

Furthermore, you can switch between installed Node.js versions:

Conclusion

That's how to upgrade your Node.js version on Linux, macOS, or Windows. With every update of Node.js, you lot can become enhanced features, increased security, better compatibility with other technologies, and more.

You need to be updating Node.js constantly to improve your evolution experience and create versatile applications.

Happy coding!


Are you letting open up-source vulnerabilities become undetected?

WhiteSource Bolt is a powerful free extension that operates in existent-time to provide visibility over your open source components within Azure Pipelines or GitHub.

  • Get real-time alerts on security vulnerabilities
  • Ensure the license compliance of open up source components.
  • Receive automated open-source inventory reports for every build or project.

Get it now and bring together thousands of developers who've already gained full visibility over their open-source components.

Source: https://www.whitesourcesoftware.com/free-developer-tools/blog/how-to-update-node-js-to-latest-version/

Posted by: vanburenrainkinste.blogspot.com

0 Response to "How To Install Latest Version Of Node"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel