Home > Web Front-end > Front-end Q&A > What should I do if executing 'node -v' shows that node is not an internal or external command?

What should I do if executing 'node -v' shows that node is not an internal or external command?

青灯夜游
Release: 2022-03-22 17:00:28
forward
3609 people have browsed it

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.

What should I do if executing 'node -v' shows that node is not an internal or external command?

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
Copy after login

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!

Related labels:
source:csdn.net
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