Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that cmd displaying node is not an internal command

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to solve the problem that cmd display node is not an internal command, it has a certain reference value, interested friends can refer to it, I hope you can learn a lot after reading this article, let the editor take you to understand it.

Cmd display node is not an internal command solution: 1, set the path of the nodejs installation directory into the system variable or user variable; 2, restart the cmd window, and enter "node-v" in the command window to view the version number.

This article operating environment: windows7 system, nodejs10.16.2 version, Dell G3 computer.

Cmd prompts that 'node' is not an internal or external command, nor is it a workaround for runnable programs

Error condition:

Run the node-xxx command in the cmd window, prompting that 'node' is not an internal or external command, nor is it a runnable program or batch file

Cause:

The environment variable is not configured correctly.

As a matter of fact, my situation is that I don't deserve it at all. The default location has been changed during installation. This problem occurs during node-v, and the environment variable needs to be configured.

Configure environment variables:

(the installation path of my node.js is F:\ download\ nodejs. When you modify the environment variable, you can modify it according to your own installation directory.)

In windows system, the path of nodejs installation directory needs to be set into system variable or user variable.

1. Open Control Panel-> system and Security-> system-> Advanced system Settings-> Environment variables

If nodejs is in the user directory, both NODE_PATH and PATH are set in the user variable

two。 Find the variable PATH in the user variable or system variable and add the node.js folder path as the value. Usually it is C:\ Program Files\ nodejs;. If the variable does not exist, create it.

Create a variable: take the variable I created as an example, create a new one in the user variable, enter the variable name-NODE_PATH, enter the value-- F:\ download\ nodejs, and create a new PATH variable if there is no PATH variable in the user variable. If you have a value of% NODE_PATH%, just add the value.

3.win+R: restart the cmd window (enter cmd after win+R to open the command window), and type node-v in the command window to view the version number. If you can view it, the environment variable is configured successfully.

Thank you for reading this article carefully. I hope the article "how to solve the problem that cmd displaying node is not an internal command" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report