Build a project with vue-cli

 

Before using vue-cli to build a project:

1.node.js environment

2. npm mirror

Start.

1.cmd open the command line, npm install -g vue-cli for global installation (vue-V can view its version)

2. vue init <template-name> <project-name>

 Example: vue init webpack myproject

Here I reported an error when I introduced it: Failed to download repo vuejs-templates/webpack , to provide you with a solution I used:

  Change the system hosts file to add:

  192.30.253.112 github.com

  151.101.88.249 github.global.ssl.fastly.net>

3. Fill in the corresponding information and select yes or no;

 

4. When done:

5. Execute the above command

  cd myproject

  npm run dev

 

 At this point, the basic construction is completed. Visit http://localhost:8081 on the webpage to see it.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325229889&siteId=291194637