Share via

I want to start a Blank JavaScript Project in Visual Studio 2022 but it tells me I need to have npm and npx installed although I (think I) have Node.js installed

Theresia R 20 Reputation points
2025-09-15T12:08:18.0033333+00:00

I'm completely new to Visual Studio and want to use it for learning how to code in JavaScript.

During installation, I selected the "Node.js" component to be installed as well.

I wanted to start a Blank JavaScript Project but it tells me I need to install npm and npx. I'm confused because I though installing the "Node.js" component should be sufficient and I can't figure out what else I need to select in the Visual Studio Installer.

In the additional information it tells me that by running "node -v" in terminal I can check which version of Node.js I have installed. But running that command only gives me an error message telling me that no file, app, etc. "node" was found.

But shouldn't I have Node.js installed after already having the component selected when installing Visual Studio 2022?

Developer technologies | Visual Studio | Setup
0 comments No comments

Answer accepted by question author

  1. Bruce (SqlWork.com) 83,821 Reputation points
    2025-09-15T15:18:13.0466667+00:00

    Visual studio does not install node, just its tools to support node projects. Just go to node.js site to download and install.

    https://nodejs.org/en

    the npm -v should work before you try creating a project.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Surya Amrutha Vaishnavi Lanka (INFOSYS LIMITED) 2,115 Reputation points Microsoft External Staff
    2025-09-29T18:22:38.2933333+00:00

    Thanks for reaching out, here are some steps you can follow

    1.Check if Node.js is installed properly

    Open Command Prompt or PowerShell and run:

    node -v ,npm -v ,npx -v

    If these commands return version numbers, Node.js, npm, and npx are installed.

    If you get an error like “command not found”, then Node.js was not added to the PATH.

    1. Fix PATH environment variable

    Sometimes Visual Studio installs Node.js in a location not added to PATH. Go to Start Menu and type “Environment Variables” to Edit the system environment variables.

    Under System variables there is Path, check if there’s an entry for Node.js. If not there, add it manually and restart Visual Studio.

    3.If Node.js is not installed

    Download and install the latest LTS version of Node.js directly from the official site:

    🔗 https://nodejs.org

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.