PHPz2017-05-16 13:40:47
Enter
path
in the command line and see if the printed path ends with nodejs. Check if there is npm.cmd in this folder
If you enter node, it can run
At the same time, there is npm.cmd in the node.exe folder, but it is still not allowed
If that doesn’t work, manually configure the node.js environment variables
PHP中文网2017-05-16 13:40:47
The problem of not configuring environment variables.
Open your command line, enter path, see if it is there, and install the node and npm variables. If it is loaded, the display should look like this, as shown in the picture.
If not, find your node and npm installation paths and add the environment variables. Under normal circumstances, environment variables will be automatically added after node is installed, and npm will also be automatically installed and environment variables will be added. Maybe when you installed node, you changed a certain step yourself, and it was not all the way to next.