Use npm command prompt: 'npm' is not an internal or external command, operable program of

npm support

Childhood program Infrastructure Library version  2.2.1  or above, and developer tools  1.02.1808300 or more start, the program supports the use of small npm install third-party packages.

This document requires developers to npm have a certain understanding, it will not go describes the basic functions of npm. Should npm not been exposed before, please read the official document npm learning.

Use npm package

  1. Run the installation package npm in the applet:
npm install

Here node_modules not mandatory and must be small root directory (i.e., in project.config.js  miniprogramRoot fields), may be present in the respective subdirectories in the root directory of the applet. But does not allow node_modules outside the small root directory.

 

 

 

When installing nodejs, sometimes we will install it when the d disk or another disk, often encounter npm environment variable is not a good job, so you need to manually configure.

  After installing nodejs input node --version to see the installation was successful, if successful will appear under the map

  Then we will be " 'npm' is not an internal or external command, operable program of" message sometimes when using npm install dependencies, and at this time we first see the environment variables

This is because there is no set environment variables, and I npm node are set environment variables

(Npm installed do not know where to go, I do not know, by searching found)

Then restart

 

Published 172 original articles · won praise 45 · views 40000 +

Guess you like

Origin blog.csdn.net/fish_study_csdn/article/details/104159774