项目 build 失败的一种情况及解决方案
按照使用方法安装,没有博客数据
发一下 config/index.js?
@CoderMing https://github.com/fydy/qablog/blob/master/src/config/index.js
我这边是可以的。你再检查下,如果还是不行再问我哈~
@CoderMing 我使用Travis ci 完成安装步骤,出现错误。ci链接:https://travis-ci.org/fydy/qa-blog/builds/465806623
https://travis-ci.org/fydy/qablog/builds/465806623
@fydy 因为我默认的 .gitignore 文件中忽略掉了 config/index.js,所以你在上传 git 仓库的时候是没有把配置文件上传上去的。
你可以修改 .gitignore,也可以本地 build 后部署到服务器上。一般来讲在前端工作流中都使用第二种方式。
;ubuntu 本地执行不成功,node版本v11.0.0.。步骤为 1)clone本项目,2)按照使用方法修订src/config/index.js,3)安装依赖 npm install 4)npm run build:hash 5)提交build下文件到github(地址:https://github.com/fydy/qablog/tree/gh-pages) .访问无数据,空白。
你部署的地址是哪里呢?
https://lvshi.cf/qablog,pages源为gh-pages
一般来讲博客都不是次级页面吧。。。
你这样需要改一个参数:config/paths.js 的第 33 行。改为:
const servedUrl = envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : './')
ok thanks.