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 badges
Add a ment  | 

1 Answer 1

Reset to default 11

Create 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