1、 install node.js


node -v View version number

2、 Install the latest vue-cli

npm install -g @vue/cli
# OR
yarn global add @vue/cli

If you previously installed a lower version , It can be uninstalled and then re installed

After installation , It can be used vue -V View version number .

**: If npm It may be slow in the domestic network environment , Solution :

Use taobao mirror :

1>. Official website :http://npm.taobao.org;

2>. install :npm install cnpm -g --registry=https://registry.npm.taobao.org;   Be careful : It is better to check the version number after installation cnpm -v Or close the command prompt and reopen it , There may be errors when you use it directly after installation ;

3>. notes :cnpm Follow npm The usage is exactly the same , Only when the command is executed npm Change it to cnpm( The following actions will cnpm Instead of npm).

4> How to update npm Methods :   have access to npm install -g npm To update the version

If it is to use vs code The terminal is used for the first time , It could be wrong :

resolvent :https://www.cnblogs.com/yuesebote/p/13750140.html

3、 Create project

Reference resources :https://www.cnblogs.com/hellocd/p/13556698.html

4、 Open other people's projects

When running someone else's project , The other side can run correctly , And I made a mistake :

reason : It's because of both sides vue Different versions result in .

resolvent : Put... In the project “node_modules” Folder deletion , And then rerun npm install