Home > Development Tools > VSCode > body text

vscode does not recognize node command

王林
Release: 2020-02-10 11:48:17
Original
5894 people have browsed it

vscode does not recognize node command

The problem leads to:

When executing the npm install command in VS Code, it reported "'npm' is not an internal or external command, nor is it an operable program or batch process. file" error.

Solution:

First check whether the environment variables are configured properly:

In the system variable NODE_PATH, the variable value is the installation path of nodejs.

vscode does not recognize node command

User variable Path contains %NODE_PATH%

vscode does not recognize node command

If the command line opened through CMD can execute node -v and npm-v, but it's not recognized in VS Code. Then there may be two situations:

1. VS Code is running when configuring environment variables.

VS Code does not dynamically refresh environment variables and needs to be restarted to recognize npm commands.

2. Insufficient permissions.

You can try running VS Code as an administrator. (This should be the case here)

Related tutorial sharing: vscode tutorial

The above is the detailed content of vscode does not recognize node 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