Linux(Ubuntu) Vue环境

安装nodejs及npm

sudo apt-get install nodejs

sudo apt-get install npm

更改为淘宝源:

npm config set registry https://registry.npm.taobao.org --global

npm config set disturl https://npm.taobao.org/dist --global

更改完成

使用 命令 npm config get registry 查看本地镜像源

安装Vue

在有nodeJs下,如果我们只想使用VueCli3,我们只需用npm install -g @vue/cli命令即可,如果我们还想使用VueCli2(包含VueCli3),

要用npm install -g @vue/cli-init ,在执行上面命令前,改为更快的源(淘宝)

 

创建Vue脚手架

创建cli2:vue init webpack 项目名

创建cli3: vue create 项目名

原文地址:https://www.cnblogs.com/zjazn/p/14883649.html