apache(web服务器)
2020-02-03 本文已影响0人
zlf_j
用途:
测试前端代码是否有问题,是否可以直接放到服务器上
apache 用法
- Windows下的Apache的下载与安装
https://blog.csdn.net/mikasoi/article/details/80976425 - 启动:
双击打开 Apache24/bin/httpd.exe
https://blog.csdn.net/ezreal_tao/article/details/82217968 - 使用:
https://jingyan.baidu.com/album/574c52195361446c8d9dc132.html?picindex=8
遇到的问题:(vue2.5.2)
- npm run dev报错
解决:
新版webpack存在的BUG,装老版本就好。
1、npm uninstall webpack-dev-server
2、npm install webpack-dev-server@2.9.1
3、npm run dev
https://blog.csdn.net/StudyLww/article/details/90756845
- npm run build 打包报错
Built files are meant to be served over an HTTP server. Opening index.html over file:// won't work.
解决办法1:
config的index.js的build配置是默认assetsPublicPath为“/”根路径,把assetsPublicPath修 改为“./”同一个路径重新打包即可。
https://blog.csdn.net/zhenmingyue123/article/details/90515566
解决办法2:
npm run build 后执行
npm install -g http-server // 该命令只需执行一次, 安装过之后, 以后就不需要重复安装了.
https://www.jianshu.com/p/5c2ea77eda8f
-
Element UI图标不显示问题,报错
image.png
解决办法:
https://www.hangge.com/blog/cache/detail_2473.html -
vue-router进行build时不显示路由页面
解决办法:
mode: 'history', 改完 mode: 'hash',
https://www.php.cn/js-tutorial-390480.html