pycharm新建vue项目文件
2018-09-29 本文已影响0人
jackmanzhang
1.首先安装Node.js
官网:https://nodejs.org/zh-cn/
1)根据自己电脑型号下载好,我这里是win10,下载了这个型号的。

2)点击安装,一步下一步最后完成,安装很简单。
3)打开控制命令行程序(CMD),检查是否正常,如果显示了例如:如下的版本则说明没有问题

2.使用淘宝NPM 镜像
大家都知道国内直接使用npm 的官方镜像是非常慢的,这里推荐使用淘宝 NPM 镜像。
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
这样就可以使用cnpm 命令来安装模块了:
3.项目初始化
1.第一步:在命令提示符中输入如下,安装vue-cli,
cnpm install vue-cli -g //全局安装 vue-cli
2.打开pycharm,具体安装步骤如下图所示


(假如此时没有发现Vue.js)解决办法请看
等待加载完毕

点击next










点击ok

在新界面中点击Terminal

在其中输入 cnpm install 回车等待安装

安装结束后(可能会卡住,可以关闭后重启,没有影响) 然后再继续输入 cnpm start 或者 cnpm run dev 然后弹出网址在浏览器中输入即可。

进度完成后

在浏览器中输入网址,即可成功显示
