Blog.csdn.net/shenwb110/a…

Download Node.js and go to nodejs.org/en/download… download

Select the Windows Installer (.msi) 64-bit version

 

Install Node.js

Double-click the download file, select the installation path, and install.

After the installation is complete, run the Node -v command in CMD to check the version

After the installation, run NPM -v in CMD

If the following information is displayed, Node.js is successfully installed.

 

3. Configure the NPM global module storage path and cache path

By default, the module will be installed in the path C:\Users\ Username \AppData\Roaming\ NPM. So you can change the path

Create two new folders, node-cache and node_global, under the node.js installation directory

NPM config set prefix “C:\software\Nodejs\node_global” NPM config set cache” C:\software\Nodejs\node_cache”

After installing the module with NPM install XXX -g, it will be in these two folders.

 

4. Install CNPM

Some NPM resources are shielded or foreign resources, which often lead to the failure of installing dependency packages using NPM. Therefore, the domestic mirror of NPM – CNPM is also needed

npm install -g cnpm –registry=registry.npm.taobao.org! [] (https://p3-juejin….

CNPM can then be used instead of NPM to install dependencies

Install vuE-CLI scaffolding

npm install -g @vue-cli

cnpm install -g @vue/cli

You can then use vue-CLI to build the project

Install webPack

cnpm install -g webpack

Vii. Build the project with VUE-CLI

Method 1: Create a vm using the CLI

First select the directory and switch to the selected directory

vue init webpack vue001

Nit: initialization

Webpack: Build tool, that is, the entire project is built on webpack

MyVue: The name of the entire project folder

 

Method 2: Create a GRAPHICAL interface for Vue project Manager

First select the directory, switch to the selected directory, execute the VUE UI, and open the VUE project Manager graphical interface

 

Create a new project and select NPM Package Manager

 

 

 

 

The project is still only a structural framework, and the dependencies required for the entire project have not yet been installed

Viii. Installation project depends on resources

Switch to the project folder and execute CNPM install (previously used CNPM instead of NPM)

Now you can run the project

Ix. Running projects

In the project directory, run NPM run dev and the project will run hot loaded.