This post will help you download and install the latest version of NodeJS, NPM, NPX, and Yarn on Windows 10, Windows 8, and Windows 7, irrespective of your system type; 32 bit or 64 bit. We’ll first download and install NodeJS and then we’ll proceed with NPM, NPX and Yarn in a bit.
yarn on a Windows system, you can use Node.js and npm (Node Package Manager). Here are the steps to install them:
- Visit the official Node.js website at https://nodejs.org/.
- Download the recommended LTS (Long-Term Support) version for Windows.
- Run the installer and follow the on-screen instructions.
Check Installation: To check if Node.js and npm were installed successfully, open a Command Prompt or PowerShell window and run the following commands:
node -v npm -v
These commands should display the installed Node.js and npm versions.
- To install Yarn, you can use npm. Open a Command Prompt or PowerShell window and run the following command:
-gflag means that Yarn will be installed globally.
npm install -g yarn
Check Yarn Installation: To check if Yarn was installed successfully, run the following command:
This command should display the installed Yarn version.
Install npx on Windows
npx utility is included with npm, so you should already have it installed if you’ve installed Node.js and npm. There is no need to download and install
That’s it! You should now have
Install NodeJS with chocoltey
To download latest version of NodeJS, either you download it form official website www.nodejs.org or use Windows package manager Chocolatey that does both download and install on the fly through the CMD or PowerShell, the only requirement to use Chocolatey is you need have chocolatey installed beforehand; you have not already, you follow this post.
To install NodeJS with chocolatey run the following command with admin rights with cmd or PowerShell.
choco install nodejs
Manual NodeJS Download
However, if you do not like to use chocolatey that’s perfectly fine.
Head to www.nodejs.org with your preferred web browser and let the page load and detect your system type (32 bit or 64). Now, you would have two NodeJS download buttons; on the right, latest version of NodeJS and on the left, the stable version of NodeJS.
Both downloads are just fine. Learners prefer downloading the current version, but in production developers choose the LTS version of NodeJS for stability and security.
After NodeJS download completes, locate the MSI package and double click on it and allow the installation on your system. If you do not have software installation right for the logged in user then you might have to login as the admin user and start the installation process.
Allow the installation by hitting the YES button and go the default options by pressing NEXT, Agree, and Install. It would not take long time to install NodeJS on your system.
Verify NodeJS version with CMD
Launch your cmd or PowerShell and type
It should tell you the installed version of NodeJS, like mine is 12
Awesome, you have installed NodeJS on your system. Now, let’s check if it has installed NPM and NPX.
Verify NPM version
To verify if NPM is installed or not, type the following command to check NPM version
To verify npx, run the following commands
Install Yarn on Windows 10
To install Yarn latest version on Windows 10, Windows 8, and Windows 7, run the following command.
npm install -g yarn
Verify Yarn version
To verify if yarn has been installed or not on your system, simply type the following command.
create-react-app with npx
NPX lets install nodejs packages on your system on the fly.. To download create-react-app locally on your system, simply run the following commands.
npx create-react-app demoapp
Now, once npx completes the downloads, change the directory and run the react server
This should start your react localhost server and hot launch your demoapp with default web browser.
Should you have any problem, kindly watch this video below.
Great.. Let others help you if came across any problem during NodeJS installation process on your system.. Good Luck!!! 🙂