美文网首页前端学习笔记
@vue/cli3.x 版本的使用

@vue/cli3.x 版本的使用

作者: 简小咖 | 来源:发表于2018-08-08 16:30 被阅读53次

官方文档
https://cli.vuejs.org/zh/guide/installation.html

安装

image.png

官网给出提示,如果已经安装了旧版本的vue-cli需要先卸载
npm uninstall vue-cli -g

同时node 也要升级到最新
之后,npm install -g @vue/cli
安装之后,项目可能报错,我遇到得是node-sass 不兼容 node v8 的版本,执行 npm i node-sass -D 就好了

vue --version或 vue -V查看版本

创建

vue create hello-world
安装过程可以有选项,具体说明看官网
还有一个比较全面的介绍,借用网友的
https://blog.csdn.net/wildye/article/details/80870345

运行

cd hello-world
npm run serve

相关文章

网友评论

    本文标题:@vue/cli3.x 版本的使用

    本文链接:https://www.haomeiwen.com/subject/avotbftx.html