Use Vue-cli 4.1.1 to build a Vue project (vue create project name) | node set Taobao source

Experience: Be sure to read the official vue-cli documentation , don't look for it yourself and waste time.

Steps:

//1.命令 回车
 vue create 项目名
//2.选择自定义配置  
Manually select features 
//3.选择你需要的配置
  *Babel (必选)
  TypeScript(项目中使用ts开发的话,就勾选)
  Progressive Web App (PWA) Support  (接口缓存,优化项目)
  *Router
  *Vuex 
  *CSS Pre-processors (css预处理器,需要)
  *Linter / Formatter (代码格式,一般默认选中)
  Unit Testing (代码测试)
  E2E Testing(需求界面测试)
//4.根据你选的配置进行Y/N选择
//5.选择完之后,就可以运行项目  
npm run serve
————————————————
原文链接:https://blog.csdn.net/diwang_718/article/details/102912743

2020.3.21
Local
Insert picture description here
U Disk
Preparations
Insert picture description here
Right-click the folder -git bush to open the command line

 npm install -g @vue/cli

(If the vue version is found out, there is no need to download the scaffolding, otherwise you need to download vue first, and then download the scaffolding) It
Insert picture description here
seems that this step was wrong, come again

winpty vue.cmd create ne_project

Insert picture description here
Press the space to select
Insert picture description here
this, I don’t know why, it’s super slow, it’s been an hour and a half
Insert picture description here


2019.12.3
I used shift+right-click to open a window here, but I couldn’t create a project. I failed both times and I
Insert picture description here
had to create it with Git bush


The main steps to start creating a project here

winpty vue.cmd create hello-world

Vue cli official website through train is
Insert picture description here
Insert picture description here
successful, just a few minutes

OK, over

[Front-end unit test] Mocha and chai

The official installation document @vue/cli:

Uninstall the old version:

npm uninstall vue-cli -g

Node version requirements

Vue CLI requires Node.js 8.9 or higher (8.11.0+ recommended) .
Node official website (12.13.1): https://nodejs.org/en/download/ An
Insert picture description here
error is reported because the version of node is too low.
Insert picture description here
Reference: https://www.cnblogs.com/Jimc/p/10278254.html


Change npm Taobao source and set cnpm

1. Configuration by command

  1. command
npm config set registry https://registry.npm.taobao.org
  1. Verify command
npm config get registry

If it returns https://registry.npm.taobao.org, the mirror configuration is successful.
Insert picture description here
Two, install by using cnpm

  1. Install cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
  1. Use cnpm
cnpm install xxx

Insert picture description here
I am really drunk and stuck here for an hour. I
Insert picture description here
checked it and tried
Insert picture description here
the installation and use of vue-cli4

Guess you like

Origin blog.csdn.net/fengtingYan/article/details/103354330