0

I've got a problem with deploying my react app with gh-pages. I tried all guides from YT and those from the first site of Google. And my GitHub pages don't show an app still. link to my repo: https://github.com/maksymilianMroz/react-todo-app

the question is Where is the problem? I didnt write smth in the code? How can I fix this? (I want to live preview on my react app by ghpages)

3
  • hello, what is the question ? Commented May 10, 2019 at 8:00
  • oh, sorry the question is Where is the problem? I didnt write smth in the code? How can I fix this? (I want to live preview on my react app by ghpages) Commented May 10, 2019 at 8:14
  • But what were you trying to do ? Commented May 10, 2019 at 8:19

1 Answer 1

1

When you open your project site https://maksymilianmroz.github.io/react-todo-app/ and do a full refresh with the developer tools of your browser enabled, you will see that all javascript and css references result in a 404. This is because all url all prefixed with maksymilianMroz.

eg https://maksymilianmroz.github.io/maksymilianMroz/react-todo-app/static/css/main.fbf7fb8c.chunk.css

where it should be https://maksymilianmroz.github.io/react-todo-app/static/css/main.fbf7fb8c.chunk.css

This is caused by the homepage property of your package.json file, as shown in the output of npm run build

enter image description here

If you adjust that property in the package.json your build will be fine.

{
  "name": "react-todo-app",
  "version": "0.1.0",
  "private": true,
  "homepage": "https://maksymilianMroz.github.io/react-todo-app",
  ...
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.