Home >Web Front-end >Front-end Q&A >What should I do if it prompts that 'node' is not an internal or external command?
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".
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!