Home > Article > Web Front-end > What should I do if executing 'node -v' shows that node is not an internal or external command?
Solution: 1. Right-click "My Computer" and select "Properties" - "Advanced System Settings" - "Advanced" - "Environment Variables"; 2. In "System Variables", create a new A "NODE_PATH" variable whose value is the node installation path; 3. Edit Path and add ";%NODE_PATH%" at the end of the variable value.
The operating environment of this tutorial: Windows 10 system, nodejs version 10.1.0, DELL G3 computer.
After installing node.js, enter "node -v
" prompt 'node' is not an internal or external command, how to solve this problem? Let me introduce it to you below.
First of all, if nodejs has been installed, the most likely reason is that the environment variables are not configured or are configured incorrectly.
Solution steps: Set environment variables
Right-click "My Computer"-Properties-Advanced System Settings-Advanced-Environment Variables, as shown below:
Then select New under the system variables in the lower column, then create a new NODE_PATH and set the installation address. I During installation, you just changed the C drive to the D drive, so it is D:\Program Files\nodejs. The address is for reference only. If you install it in another location, the address here will be different.
Then edit the Path and add ;%NODE_PATH%
at the end of the variable value Then test it, enter node -v
to check the node version; or enter npm -v
node -v npm -v
to configure it .
For more node-related knowledge, please visit: nodejs tutorial!
The above is the detailed content of What should I do if executing 'node -v' shows that node is not an internal or external command?. For more information, please follow other related articles on the PHP Chinese website!