1. 安装node.js 去官网下载 如果node-v检测失败,去我的电脑里配置NODE-PATH的路径。





使用vue-cli 搭建项目
2. 安装淘宝镜像 npm install -g cnpm --registry=https://registry.npm.taobao.org
3. 下载全局工具 去项目文件夹所在的盘
例: d: cd 仿锤子商城

cnpm install -g vue-cli 运行

4. 下载基于webpack模板项目
vue init webpack Smartisan (最后一个是项目名称) 运行
smart 运行 setupe2e那块写no

5. 进入项目 cd Smartisan
运行项目 npm run dev
6. 如果没有出现网址,有错误
运行这些命令
npm remove webpack-dev-server
npm install webpack-dev-server@2.9.1
npm run dev

网友评论