admin管理员组文章数量:1287124
When testing locally my create-react-quiz app works perfectly. I was basing my project off of this code: .
However, when I use npm build deploy on my "GitHub-Pages" branch, a blank page shows up and these errors show up in the console: pk8189.github.io/:1 GET pk8189.github.io/pk8189/futureU-/static/css/main.1dc4d41f.css pk8189.github.io/:1 GET pk8189.github.io/pk8189/futureU-/static/js/main.28e294a0.js
This is my repo: What do you think the issue is? Thank you for any help.
When testing locally my create-react-quiz app works perfectly. I was basing my project off of this code: https://github./mitchgavan/react-multi-choice-quiz/tree/gh-pages.
However, when I use npm build deploy on my "GitHub-Pages" branch, a blank page shows up and these errors show up in the console: pk8189.github.io/:1 GET pk8189.github.io/pk8189/futureU-/static/css/main.1dc4d41f.css pk8189.github.io/:1 GET pk8189.github.io/pk8189/futureU-/static/js/main.28e294a0.js
This is my repo: https://github./pk8189/futureU- What do you think the issue is? Thank you for any help.
Share Improve this question asked Jul 2, 2017 at 23:07 Patrick KellyPatrick Kelly 631 silver badge4 bronze badges1 Answer
Reset to default 11Create React App uses homepage
field in your package.json
to determine the URL at which the app is served. Since you set it to https://github./pk8189/futureU-/
, it tries to request assets from /pk8189/futureU-/
which doesn't exist.
Change homepage
to match your deployed URL: https://pk8189.github.io/futureU-/
. Then rebuild by running npm run build
and re-deploy.
This is described in deployment instructions for GitHub Pages. Please read this part of the User Guide.
本文标签: javascriptCreateReactApp on Githubpages returns a blank pageStack Overflow
版权声明:本文标题:javascript - Create-React-App on Github-pages returns a blank page - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741305736a2371357.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论