在上两篇博文中已经安装了node.js、webpack、vue-cli,安装的版本为:

今天通过这篇博文创建项目。

1.选择路径

首先通过命令行进入想要创建项目的路径,例如:

通过e:命令进入盘幅,再经过cd命令进入文件夹。

2.创建项目

通过命令vue init webpack pm,其中pm为你创建项目的项目名称,在执行命令后vue-cli会下载模板,之后进行项目信息设置:

  1.  
    设置项目名称
  2.  
    ? Project name pmtext
  3.  
    设置项目描述
  4.  
    ? Project description intracompany
  5.  
    作者
  6.  
    ? Author hys
  7.  
    ? Vue build (Use arrow keys)
  8.  
    ? Vue build standalone
  9.  
    设置路由
  10.  
     ? Install vue-router? Yes
  11.  
     
  12.  
     ? Use ESLint to lint your code? No
  13.  
    单元测试
  14.  
     ? Set up unit tests Yes
  15.  
    ? Pick a test runner jest
  16.  
    ? Setup e2e tests with Nightwatch? Yes
  17.  
    ? Should we run `npm install` for you after the project has been created? (recom
  18.  
    ? Should we run `npm install` for you after the project has been created? (recom
  19.  
    ? Should we run `npm install` for you after the project has been created? (recom
  20.  
    ? Should we run `npm install` for you after the project has been created? (recom
  21.  
     
  22.  
    mended) no  (此处应该选择no
  23.  
     
  24.  
    vue-cli · Generated "pmtext".
  25.  
     
  26.  
    # Project initialization finished!
  27.  
    # ========================
  28.  
     
  29.  
    To get started:
  30.  
    提示下一步操作
  31.  
    进入pmtext文件夹
  32.  
     cd pmtext
  33.  
    初始化项目
  34.  
     npm install (or if using yarn: yarn)
  35.  
    运行项目
  36.  
     npm run dev

执行上面内容后即完成了项目的所有内容,按照链接即可打开项目。

bug

如果在执行:

vue init webpack pm 卡死,说明node.js的版本有问题,尝试其他稳定版,即可以解决此问题。

报错:

  1.  
    39365 error code ELIFECYCLE
  2.  
    39366 error errno 1
  3.  
    39367 error chromedriver@2.38.3 install: `node install.js`
  4.  
    39367 error Exit status 1
  5.  
    39368 error Failed at the chromedriver@2.38.3 install script.
  6.  
    39368 error This is probably not a problem with npm. There is likely additional logging output above.

解决链接

npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver


最新文章

  1. ERROR: Unable to globalize '/usr/local/NONE/etc/php-fpm.d/*.conf' 问题的解决
  2. Spring整合Redis
  3. oracle 用户创建这个挺靠谱
  4. DBA的技能图谱
  5. 【maven】之使用jetty发布web项目
  6. JAVA 子父类的特点
  7. MVC异步 导入excel文件
  8. Cocos2d-x Layout简单使用
  9. 转 Oracle12c/11个 Client安装出现"[INS-30131]"错误“请确保当前用户具有访问临时位置所需的权限”解决办法之完整版
  10. Rabbitmq 性能测试
  11. NodeMCU入门(4):搭建Web服务器,配置网络连接
  12. Result Maps collection does not contain value for com.man.impet.dao.OrderBeanMapper.map
  13. iOS 与 Swift 方法互相调用
  14. centos 7.5安装docker-CE 18
  15. docker swarm 英文参考资料阅读列表
  16. BTM学习小记
  17. JAVA关于泛型的笔记
  18. 常用官方php版本下载链接
  19. git 删除远程分支和本地分支
  20. HBase Filter程序样例及Shell(图)

热门文章

  1. Sql Server 中将由逗号“,”分割的一个字符串转换为一个表集,并应用到 in 条件中
  2. mybatis-plus快速入门使用
  3. nginx学习与使用
  4. Android 查看蓝牙hci日志
  5. Direct3D 11 Tutorial 2: Rendering a Triangle_Direct3D 11 教程2:渲染一个三角形
  6. 库存秒杀问题-redis解决方案- 接口限流
  7. 【App】不通过App Store实现ios应用分发下载安装(转)
  8. sparksql udf自定义函数中参数过多问题的解决
  9. C# 鼠标移动Winform窗体内或者panel容器内的控件 显示虚线/实现虚线框来确定位置
  10. springBoot整合ftp上传图片功能