What should I do if it prompts that 'node' is not an internal or external command?

青灯夜游
Release: 2021-12-13 12:04:34
Original
11810 people have browsed it

Solution: 1. Open the "Control Panel", click "System and Security" - "System" - "Advanced System Settings" - "Environment Variables"; 2. In the user variables, change "NODE_PATH" The value is set to the nodejs installation directory path; 3. In the system variable, add the nodejs installation directory path to "path".

What should I do if it prompts that 'node' is not an internal or external command?

The operating environment of this tutorial: windows10 system, nodejs version 12.19.0, DELL G3 computer.

Situation:

After installing nodejs, enter node -v on the command line, prompting 'node' is not an internal or external command, nor Runnable program or batch file

Cause:

Check that the environment variable is not configured correctly

Configure the environment variable:

In windows system, you need to set the nodejs installation directory path into the system variable or user variable

Open the control panel->System and Security->System-> ;Advanced system settings->Environment variables

  • Set NODE_PATH in user variables: C:\Program Files\nodejs\ (This is my nodejs installation directory, you can adjust it according to your own situation Modification)

  • Add system variables to path: C:\Program Files\nodejs\

For more node-related knowledge, please visit: nodejs tutorial! !

The above is the detailed content of What should I do if it prompts that 'node' is not an internal or external command?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!