51.webpack vue-cli创建项目
2024-10-19 07:32:57
在上两篇博文中已经安装了node.js、webpack、vue-cli,安装的版本为:
今天通过这篇博文创建项目。
1.选择路径
首先通过命令行进入想要创建项目的路径,例如:
通过e:命令进入盘幅,再经过cd命令进入文件夹。
2.创建项目
通过命令vue init webpack pm,其中pm为你创建项目的项目名称,在执行命令后vue-cli会下载模板,之后进行项目信息设置:
- 设置项目名称
- ? Project name pmtext
- 设置项目描述
- ? Project description intracompany
- 作者
- ? Author hys
- ? Vue build (Use arrow keys)
- ? Vue build standalone
- 设置路由
- ? Install vue-router? Yes
- ? Use ESLint to lint your code? No
- 单元测试
- ? Set up unit tests Yes
- ? Pick a test runner jest
- ? Setup e2e tests with Nightwatch? Yes
- ? Should we run `npm install` for you after the project has been created? (recom
- ? Should we run `npm install` for you after the project has been created? (recom
- ? Should we run `npm install` for you after the project has been created? (recom
- ? Should we run `npm install` for you after the project has been created? (recom
- mended) no (此处应该选择no)
- vue-cli · Generated "pmtext".
- # Project initialization finished!
- # ========================
- To get started:
- 提示下一步操作
- 进入pmtext文件夹
- cd pmtext
- 初始化项目
- npm install (or if using yarn: yarn)
- 运行项目
- npm run dev
执行上面内容后即完成了项目的所有内容,按照链接即可打开项目。
bug
如果在执行:
vue init webpack pm 卡死,说明node.js的版本有问题,尝试其他稳定版,即可以解决此问题。
报错:
- 39365 error code ELIFECYCLE
- 39366 error errno 1
- 39367 error chromedriver@2.38.3 install: `node install.js`
- 39367 error Exit status 1
- 39368 error Failed at the chromedriver@2.38.3 install script.
- 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
最新文章
- ERROR: Unable to globalize '/usr/local/NONE/etc/php-fpm.d/*.conf' 问题的解决
- Spring整合Redis
- oracle 用户创建这个挺靠谱
- DBA的技能图谱
- 【maven】之使用jetty发布web项目
- JAVA 子父类的特点
- MVC异步 导入excel文件
- Cocos2d-x Layout简单使用
- 转 Oracle12c/11个 Client安装出现";[INS-30131]";错误“请确保当前用户具有访问临时位置所需的权限”解决办法之完整版
- Rabbitmq 性能测试
- NodeMCU入门(4):搭建Web服务器,配置网络连接
- Result Maps collection does not contain value for com.man.impet.dao.OrderBeanMapper.map
- iOS 与 Swift 方法互相调用
- centos 7.5安装docker-CE 18
- docker swarm 英文参考资料阅读列表
- BTM学习小记
- JAVA关于泛型的笔记
- 常用官方php版本下载链接
- git 删除远程分支和本地分支
- HBase Filter程序样例及Shell(图)
热门文章
- Sql Server 中将由逗号“,”分割的一个字符串转换为一个表集,并应用到 in 条件中
- mybatis-plus快速入门使用
- nginx学习与使用
- Android 查看蓝牙hci日志
- Direct3D 11 Tutorial 2: Rendering a Triangle_Direct3D 11 教程2:渲染一个三角形
- 库存秒杀问题-redis解决方案- 接口限流
- 【App】不通过App Store实现ios应用分发下载安装(转)
- sparksql udf自定义函数中参数过多问题的解决
- C# 鼠标移动Winform窗体内或者panel容器内的控件 显示虚线/实现虚线框来确定位置
- springBoot整合ftp上传图片功能