WebStorm uses the npm command prompt:'npm' is not an internal or external command, nor is it a solution for a runnable program

Problem Description

Enter WebStorm, enter npm/cnpm install in the console, and the npm/cnpm command is unavailable.

Solution

1. First determine whether the node environment variable win+R is configured and
Insert picture description here
Insert picture description here
Insert picture description here
open the console.
Enter the command node -v and npm -v to pop up the version information, and there is no problem with the environment variable configuration

Insert picture description here

2. Open WebStorm and click File->Settings…->search bar and enter Node.js and NPM, follow the steps to configure
Insert picture description here

3. Open win+R and enter cmd, right-click the white border of the console and click Properties.
Insert picture description here
Check the option indicated by the arrow, and then restart WebStorm. Enter the npm install command again.

If it still prompts: 'npm' is not an internal or external command, nor is it an executable program.
Restart the computer! ! !
Restart the computer! ! !
Restart the computer! ! !

Guess you like

Origin blog.csdn.net/Hambur_/article/details/110954420