Open In App

How to Install Node & Run NPM in VS Code?

Last Updated : 03 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Node.js is an open-source, server-side JavaScript runtime environment built on the V8 engine. It allows developers to execute JavaScript code outside of a web browser. In this article, we will see how to install Node.js and NPM and install packages in VS Code using NPM.

Steps to Install NodeJS and NPM in VS code

Step 1: Visit the Node.js website and download the Windows installer.

Step 2: According to your operating system, install the particular installer by clicking the installer (Windows installer, macOS installer).

1

Step 3: Complete the setup (install Node.js and npm):

3
NodeJS Setup
4
accept the terms and next

Step 4: Choose the desired path where you want to install or leave it default.

  • By clicking on the Next button, you will get a custom page setup on the screen. Make sure you choose npm package manager, not the default of NodeJS runtime . This way, we can install Node and NPM simultaneously.
  • The following features will be installed by default Node.js runtime and Npm package manager.
  • By clicking next you are all set click the install button and you are done with installation of Node.js and npm.
5
Destination folder
6
click next

7

You are ready

9

Step 5: Check for installation

Follow the steps to check that Node.js and npm is properly installed in your device. open command prompt (cmd)

0
command prompt

Step 6: To check Node installation, type Node -v command in command prompt. After giving the command you will see the Node version in the output in this case v20.11.1 is the version installed in my device, if you are not able to see check for the installation process again or re-install.

0

Step 7: To check NPM installation, type npm -v command in command prompt. After running the command you will see the version of npm in my case it is 10.2.4. if not check for the installation or reinstall it.

0

Now you are ready to use Node and npm in vs code. You can run your file using Node in the vscode terminal

0_1


Next Article

Similar Reads