Darryl Dias

27 Jan 2024 in nodejsjavascriptwindowstutorials

Node.js is an open-source, cross-platform JavaScript runtime environment that executes JavaScript code outside of a web browser. It is used by many big companies like Netflix and Uber. Before Node.js, JavaScript could only be executed in the browser. With Node.js, you can run your code as a standalone application.

To install it on Windows 10 or 11, follow the instructions below.

Step 1. Open Command Prompt
You can open the command prompt by pressing the Windows key + R, then typing in that window cmd.exe and press enter.

Step 2. Run the install command shown below and press enter

winget install -e --id OpenJS.NodeJS

The commands above will download the Node.js setup files and run the setup as administrator, and then you have to press yes.

Once the installation completes, you will find the Node.js application and command prompt environment available in the start menu.

nodejs-start-menu

To test if it works correctly, open the Node.js application and enter the command prompt window

console.log('Hello')

The output would be like in the screenshot below.

nodejs-cmd

Now you have Node.js setup on your Windows PC.

Thank you for reading.