The npm -v and nodemon -v commands can be executed normally in cmd, but in the vs code terminal, the npm command cannot be executed to solve the official sales problem:
Solution 1 , right-click vs code compatibility and run as administrator, restart vs code
Option 2, add the environment variable of the path where npm is located
View the npm environment variable path:
In Execute npm list -g --depth 0 in cmd to view the globally installed packages
Recommended learning:vscode tutorial
The above is the detailed content of Unable to use npm command in vscode terminal. For more information, please follow other related articles on the PHP Chinese website!