Node.js is a very popular JavaScript running environment and is widely used in server-side development, command line tools, web development and other fields. Since Node.js is constantly updated and iterated, there are some changes and new features in each version. Therefore, sometimes it is necessary to download a specific version of Node.js for specific application scenarios.
This article will introduce how to download the specified version of Node.js.
1. Understand the Node.js version naming rules
Before downloading the Node.js version, we need to understand the Node.js version naming rules. The official version number of Node.js is based on the SemVer (Semantic Version) specification. The format of each version number is MAJOR.MINOR.PATCH, where:
- MAJOR represents the major version number. Node.js with the same MAJOR version number can be compatible, but may not be backward compatible.
- MINOR represents a minor version number. Changes to the MINOR version number include new features and bug fixes, and are backward compatible.
- PATCH represents the patch version number, which only contains bug fixes and is backward compatible.
In addition, Node.js also has some version names that are different from the standard SemVer specification, such as LTS version and the latest stable version.
2. Download the specified version of Node.js through nvm
nvm (Node Version Manager) is a very convenient Node.js version management tool that allows us to easily manage different versions of Node.js. Switch between Node.js. Before using nvm to download the specified version of Node.js, we need to install nvm. Here we take the macOS system as an example. For other operating systems, you can refer to the official documentation of nvm for installation.
- Install nvm
Execute the following command in the terminal to install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
Note: After installing nvm, you need to restart the terminal to use the nvm command.
- View available versions
Execute the following command to view available Node.js versions:
nvm ls-remote
The latest Node.js version will be at the top. If you need to view a specific version of Node.js, you can search through filters, for example, find the v14.18.1 version:
nvm ls-remote | grep 'v14.18.1'
- Install the specified version
Execute the following command to install Specified version of Node.js:
nvm install v14.18.1
After the installation is complete, you can view the installed Node.js version through the following command:
nvm ls
- Use the specified version
Execute the following command in the terminal to switch to the specified version of Node.js:
nvm use v14.18.1
You can use the following command to verify whether the Node.js version is switched successfully:
node -v
3. Through the official website Download the specified version of Node.js
If you do not want to use nvm to manage the Node.js version, you can also directly download the specified version of Node.js through the official website of Node.js.
- Open the official website of Node.js
Enter https://nodejs.org/ in the browser to open the official website of Node.js.
- Select the download version
On the home page of the official website, click the "Download" button to enter the download page. On the download page, we can choose from a variety of Node.js versions for different operating systems.
If you need to download a specified version of Node.js, you can find the version we need in the "Previous Releases" tab, click on the corresponding version number to enter the download page.
- Download and install Node.js
In the download page, you can choose to download the corresponding version of the Node.js installer for installation. After the installation is complete, you can execute the following command in the terminal to verify whether Node.js is installed successfully:
node -v
4. Summary
This article introduces how to download the specified version of Node.js. Node.js versions can be easily managed using the nvm tool. At the same time, the official Node.js website also provides Node.js installation programs for various operating systems to facilitate users to download and install specified versions of Node.js. No matter which method is used, you need to understand the naming rules of the Node.js version before downloading to ensure that the downloaded version meets our needs.
The above is the detailed content of How to download a specified version of nodejs. For more information, please follow other related articles on the PHP Chinese website!

The article discusses useEffect in React, a hook for managing side effects like data fetching and DOM manipulation in functional components. It explains usage, common side effects, and cleanup to prevent issues like memory leaks.

Lazy loading delays loading of content until needed, improving web performance and user experience by reducing initial load times and server load.

Higher-order functions in JavaScript enhance code conciseness, reusability, modularity, and performance through abstraction, common patterns, and optimization techniques.

The article discusses currying in JavaScript, a technique transforming multi-argument functions into single-argument function sequences. It explores currying's implementation, benefits like partial application, and practical uses, enhancing code read

The article explains React's reconciliation algorithm, which efficiently updates the DOM by comparing Virtual DOM trees. It discusses performance benefits, optimization techniques, and impacts on user experience.Character count: 159

Article discusses connecting React components to Redux store using connect(), explaining mapStateToProps, mapDispatchToProps, and performance impacts.

The article explains useContext in React, which simplifies state management by avoiding prop drilling. It discusses benefits like centralized state and performance improvements through reduced re-renders.

Article discusses preventing default behavior in event handlers using preventDefault() method, its benefits like enhanced user experience, and potential issues like accessibility concerns.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Chinese version
Chinese version, very easy to use

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft