Vue install Windows development environment

Note: the humble see things, but always make you bad, follow this step, you will take a lot less detours. . .

1: Download Node.js  

First, download the installation package

Access Address:
https://nodejs.org/en/download/
Here Insert Picture Description

 

Second, the installation

  1. Double click to run the installation package
    Here Insert Picture Description
    Here Insert Picture Description

  2. Select the installation path, the default is the C drive, D drive I chose here
    Here Insert Picture Description

  3. The default is like
    Here Insert Picture Description

Here Insert Picture Description
Here Insert Picture Description

Third, check the version

    1. Win + R, enter cmd, dos open command, the input  node -v view the version number NodeJS
      Here Insert Picture DescriptionHere Insert Picture Description

    2. Fourth, the environment variable configuration

      Environment configuration npm main configuration of the path of the global module mounting location, and the path of the cache buffer, the reason for the configuration, because after performing similar: npm install express [-g] (back of the optional parameters -g, g the representative of the overall global mean installed) the installation of the statement, will install the module to [C: \ users \ username \ AppData \ Roaming \ npm] path, accounting for C disk space.

      For example: I want the whole module resides on my path and cache path node.js installation folder, the files in the folder I installed [D: \ nodejs] create two folders under node_global [] and [] node_cache As shown below:
      Here Insert Picture Description

      1. In the current folder, press Shift + right mouse button to open the cmd command line
        Here Insert Picture Description

      2. Enter the following command set

        npm config set prefix "D:\NodeJS\node_global"
        npm config set cache "D:\NodeJS\node_cache"
        
        • 1
        • 2
      3. Set environment variables, close cmd window, "My Computer" - Right - "Properties" - "Advanced System Settings" - "Advanced" - "Environment Variables"
        Here Insert Picture Description

      4. Into the Environment Variables dialog box, the new NODE_PATH] [Enter] under [System variables D:\NodeJS\node_global\node_modules, the variables [user] under [Path] is modifiedD:\NodeJS\node_global
        Here Insert Picture Description
        Here Insert Picture Description
        Here Insert Picture Description
        Here Insert Picture Description

      Six test

      After configuration, install a module under test, we will install the most commonly used express module, open cmd window,
      enter the following command, carried out a global module installation:

      npm install express -g     # -g是全局安装的意思
    3. This installation has been successful, due to the domestic use npm is very slow, so here we recommend using Taobao npm image, use

      Taobao cnpm command management tool can replace the default management tools npm: $ npm install  - G cnpm  - Registry = HTTPS : //registry.npm.taobao.org;

      Three: After Taobao image is successfully installed, we can globally vue-cli scaffolding, enter the command: CNPM install  - , Ltd. Free Join  vue - cli Enter; verify that the installation is successful, the command input vue, vue out information, and the installation is successful ;

    4. Four: After the completion of building scaffolding, we want to start to build a new project, this time I would suggest, well not installed in C drive, since vue downloaded files are large, if you want to change the disc, then directly enter D: Enter on you can directly change the disc,

      Then we started to create new projects enter the command: vue the init webpack  My - Project Enter, my-project is the name of my own folder, is based webpack project, after the input has been enter, whether you want to install vue appear until -route,

      In this project we have to use, so we enter y Enter

    5.  

       So basically successful, the rest of the start-up test is not to say,

Guess you like

Origin www.cnblogs.com/tianxujun/p/11468649.html