Home>Article>Development Tools> Unable to use npm command in vscode

Unable to use npm command in vscode

王林
王林 Original
2019-12-30 13:19:17 12965browse

Unable to use npm command in vscode

First check whether the environment variables are configured properly:

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

Unable to use npm command in vscode

User variable Path contains %NODE_PATH%

Unable to use npm command in vscode

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 administrator.

Recommended related articles and tutorials:vscode tutorial

The above is the detailed content of Unable to use npm command in vscode. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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