搭建vue.js 的npm脚手架

1、在cmd中,找到nodeJs安装的路径下,运行 vue -V,查看当前vue版本,如下图所示,表明已经安装过了。

2、没有安装,进行安装。在cmd中,找到nodeJs安装的路径下,运命令行 npm install cnpm -g --registry=https://registry.npm.taobao.org ----使用淘宝镜像

3、 安装vue项目所需要的依赖,运行命令 npm install

4、运行启动项目:npm run dev

如果安装失败,使用全局卸载命令: npm uninstall vue-cli -g

原文地址:https://www.cnblogs.com/CHNMurphy/p/9806219.html