Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install Node.js on Windows

This guide shows you how to install Node.js on Windows. You can then run JavaScript programs outside a web browser.

Windows Hosting2 min read18 steps8 screenshots

What is Node.js?

JavaScript is a language that makes web pages interactive. Node.js lets you run JavaScript on your own computer or on a server, not only inside a browser. Many modern websites and tools use it. Node.js comes with npm. npm is a helper that downloads ready-made code packages for your projects.

Steps

  1. Open your web browser and go to the official Node.js website, nodejs.org.
  2. You will see two download buttons. Choose the one marked LTS. LTS means long-term support. It is the steady version that is best for most people.
  3. Click the Windows installer button. The file ends in .msi.
    download nodejs msi installer
  4. Open the downloaded file.
  5. Click Next on the welcome screen.
  6. Read and accept the license, then click Next.
    nodejs setup wizard
    end user license agreement
  7. Keep the default folder and click Next.
    destination folder for nodejs files
  8. Keep the default features. Make sure Add to PATH is on. PATH is a list of folders where Windows looks for programs. Without it, the commands will not work.
  9. You may see an option to install tools for native modules. You can leave it unticked for now.
    customize the nodejs setup
    ready to install nodejs setup
  10. Click Install. Click Yes if Windows asks for permission.
  11. Click Finish.

Check that it works

  1. Close any open Command Prompt windows.
    finish nodejs setup
  2. Click Start, type cmd, and open Command Prompt.
  3. Type this and press Enter:
    node -v
    This shows the Node.js version.
    command prompt for windows powerShell
  4. Type this and press Enter:
    npm -v
    This shows the npm version.

If you see version numbers, it worked.

Run your first program

  1. Open Notepad and type: console.log("Hello");
  2. Save the file as hello.js in a folder, such as C:\test.
  3. In Command Prompt, run:
    cd C:\test
    node hello.js
    The first line enters the folder. The second runs your program. It prints Hello.
Tip: If you see "node is not recognized", restart the computer or open a new Command Prompt. This lets Windows read the new PATH.
Tip: Whether Node.js apps can run on your Hostvento plan depends on the plan. Ask Hostvento support if you want to host one.

Quick recap

  • Node.js runs JavaScript outside the browser.
  • Download the LTS Windows installer from nodejs.org.
  • Run it and keep Add to PATH on.
  • Check with node -v and npm -v.