Windows install npm

installation steps

  1. Download address : https://nodejs.org/en/, select the version to download
    Insert picture description here

  2. Double-click the downloaded executable file to install
    Insert picture description here

  3. Click "next"
    Insert picture description here

  4. Check "Accept Agreement" and click "nexrt"
    Insert picture description here

  5. Select the installation directory, click "next"
    Insert picture description here

  6. Add to PATH will be added to the path environment variable by default, and click "next"
    Insert picture description here

  7. Always keep the default, click "next", and finally click install to install
    Insert picture description here

  8. After the installation is complete, the directory structure is shown below:
    Insert picture description here

  9. Open cmd terminal
    Insert picture description here

  10. Check whether it is added to the environment variable

Insert picture description here

  1. View node version
    Insert picture description here

  2. In the installation directory create two folders, respectively node_cache and node_global
    If you do not set the global directory node_global, then the global default installation files will be saved to
    C: \ Users \ Administrator \ AppData \ Roaming \ npm
    Insert picture description here
    user variable settings: speak with The value in the variable C:\Users\Administrator\AppData\Roaming\npm is changed to D:\node\node_global
    Insert picture description here

System variable settings: add variable NODE_PATH=D:\node\node_modules
Insert picture description here

  1. Open cmd and execute
    npm config set prefix “D:\node\node_global”
    npm config set cache “D:\node\node_cache”
    npm list -global to view the changed valueInsert picture description here

  2. Configure Taobao mirror (others are also available) to increase download speed
    npm config set registry=http://registry.npm.taobao.org
    npm config list Display all configuration information, you can see the items just configured Insert picture description here
    View the configured mirror
    Insert picture description here

  3. Test using npm to install vue.js

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_37640410/article/details/109093805