Open In App

How to Install Node & Run npm in VS Code?

Last Updated : 27 Mar, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Node 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, enabling the development of scalable and efficient network applications. Known for its event-driven architecture, NodeJS is widely used for building fast, lightweight, and highly responsive server-side applications.

What is Node Package Manager (NPM)?

NPM, short for Node Package Manager, is the default package manager for NodeJS. It is a command-line utility that allows you to install, manage, and share packages or modules of JavaScript code. These packages can range from small utility libraries to large frameworks and can be easily integrated into Node.js projects to extend their functionality.

Steps to Install the NodeJS and NPM in VS code:

Step 1: Download the installer: Visit the NodeJS website (download here) 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

click next

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

8

you are ready

9

Step 4 : 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 5: 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 6: 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 check the same in vs code also

1-(1)

  • you can run your file using node in the vscode terminal

0_1



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads