Windows installed VUE development environment

Attention: Things that look inconspicuous when you look at it can always make you feel bad. According to this step, you will avoid a lot of detours. . .

1: Download Node.js

First, download the installation package

Access address:
https://nodejs.org/en/download/
Insert picture description here

  • Four. Environment Variable configuration

    Environment configuration mainly configures the path of the global module installed by npm and the path of the cache cache. The reason for this configuration is that it will be similar in the future: npm install express [-g] ( The following optional parameter -g, g represents the meaning of global installation), the installed module will be installed to the path [C:\Users\Username\AppData\Roaming\npm], occupying the C drive space .

    For example: I want to put the path of the full module and the cache path in the folder where I installed node.js, then create two folders under the folder where I installed [D:\nodejs] [Node_global] and [node_cache] are as follows:
    insert picture description herenpm config set prefix "D:\NodeJS\node_global" npm config set cache "D:\NodeJS\node_cache"

    • 1
    • 2
  • Set environment variables, close the cmd window, “My Computer”-right click-“Properties”-“Advanced System Settings”-“Advanced”-“Environment Variables”
    here Insert picture description npm install express -g # -g means global installation

  • This is already a successful installation, because it is very slow to use npm in China. So here we recommend to use Taobao npm mirror, use Taobao’s cnpm command management tool to replace the default npm management tool: $ npm install g cnpmregistry=https< span class="pun">://registry.npm.taobao.org;

    Three: After the Taobao image is successfully installed, we can global vue-cli scaffolding, enter the command: cnpm installglobalvuecli Press Enter; to verify whether the installation is successful, enter vue in the command, and the vue information will be displayed, and the installation is successful;

  • Four: After the scaffolding is completed, we will start to build a new project. At this time, I suggest that you don’t install the On the C drive, because the file downloaded by vue is relatively large, if you want to change the drive, you can directly enter D: Enter to change the drive directly,

    Then we start to create a new project and enter the command: vue init webpackmyproject Enter , My-project is the name of my own folder, which is a webpack-based project. After inputting, I keep pressing Enter until it appears whether I want to install vue-route,

    This is what we need in the project, so just type y and press Enter

  • < img alt="Share a picture" src="/wp-content/uploads/images/os/windows/1626798002483.png">

    This is basically successful, and the rest of the startup test Not much to say,

  • Leave a Comment

    Your email address will not be published.