What is Node.js? What is NPM? How to download and install NPM and Node.js? This post from MiniTool Partition Wizard will show you all. In addition, it will also tell you how to verify the NPM and Node.js versions.
Introduction to NPM and Node.js
According to Wikipedia, Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on a JavaScript Engine and executes JavaScript code outside a web browser, which was designed to build scalable network applications.
It lets developers use JavaScript to write command line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user’s web browser.
As for NPM, short for Node Package Manager, it is the default package manager for the JavaScript runtime environment Node.js. It consists of a command line client, also called NPM, and an online database of public and paid-for private packages, called the NPM registry.
The registry is accessed via the client, and the available packages can be browsed and searched via the NPM website.
How to Download Node.js for Windows and macOS
NPM is included in the Node.js download, so you don’t need to download NPM standalone. How to download Node.js for Windows and macOS? Please refer to the following steps:
- Go to the official Node.js website.
- Click the Downloads button.
- Click the Windows Installer or macOS Installer to get the Node.js download. The default Node.js download is the LST version and 64-bit.
How to Install NPM and Node.js
How to install Node.js and NPM on Windows:
- Run the Windows Installer file and accept the Node.js license agreement.
- Select the destination where you want to install Node.js. The default location is on the C drive.
- Customize the setup options. In this step, the NPM is selected by default for NPM installation.
- Decide whether to automatically install tools for native modules.
- Click the Install button to complete the Node.js and NPM installation.
How to install Node.js and NPM on Mac:
Installing NPM and Node.js on Mac is very similar to that on Windows. You just need to run the macOS Installer file and follow the wizard to complete the NPM and Node.js installation.
How to install NPM and Node.js on Ubuntu:
There are 2 ways to install Node.js and NPM on Ubuntu. Here is the first way. This way is easy but might have an older version.
- Press Ctrl + Alt + T to open the terminal.
- Execute the command “sudo apt install nodejs” to install Node.js Ubuntu.
- Execute the command “sudo apt install npm” to install NPM Ubuntu.
Here is the second way. This way is slightly more complicated but you can get the latest release of Node.js.
- Execute the command “sudo apt install curl” to install the Curl command line tool.
- Execute the command “curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash –” to get the Node.js download.
- Execute the command “sudo apt install nodejs” to complete the installation.
To verify the installed Node.js and NPM versions, you can use the following two commands: “node -v” and “npm -v”. To update Node.js, you can download the latest installer file and install it again.
Bottom Line
Are you interested in MiniTool Partition Wizard? This software can help you clone the system, manage disks better, and recover data. If you have this need, you can download it from the official website.