This is the sixth day of my participation in the August More text Challenge. For details, see: August More Text Challenge

I believe that many people will encounter some large and small pits when they just start to learn the vUE framework and set up the development environment at the beginning. I built it once before when I was learning. A month later, when I built the second time, THERE was some confusion, so I want to sort it out today.

Vue is now on the front end and is one of the most commonly used frameworks for front-end engineers today

First, before building the development environment of VUE, it is necessary to download Node. js first. The operation of VUE depends on the management tool of NPM of Node.

2. Download node, open the docs management tool, check the node installation is successful, type node -v, press Enter, the node version will be output,

In this way, the installation has been successful. Because it is very slow to use NPM in China, we recommend using Taobao NPM image here

$NPM install -g CNPM –registry=registry.npm.taobao.org; $NPM install -g CNPM –registry=registry.npm.taobao.org; (Of course, you can also not install Taobao mirror)

CNPM install –global vue-cli (short for CNPM install -g vue-cli) To check whether the installation is successful, run the vue command. The vUE information is displayed, indicating that the installation is successful.

 

Four: After the scaffolding is built, we will start to build a new project. At this time, I suggest that we try not to install it on disk C, because the files downloaded from vue are relatively large. If you want to change the disk, you can directly change the disk by typing D: press enter.

Then we start to create a new project and we type in the command: vue init webpack my-project and press enter. My my-project is the name of my own folder, which is based on Webpack.

That’s what we’re going to use in the project, so I’m just going to type y and press enter

 

The following will appear whether js syntax detection is needed, which we cannot use temporarily, we can directly input no, and the following can directly input no, which we cannot use temporarily

CD my-project press Enter. Because the templates are dependent on each other, so now we need to install the dependencies.

Enter the command: CNPM install

5: after the installation, now to test our downloaded template can run normally, in the command line type: CNPM run dev press Enter.

Localhost :8080 is the default port. To access the default template, enter localhost:8080 in your browser.