I have an issue where I deploy my React app the images are not showing. Works fine locally. I've set the homepage to a GitHub site http://ryandixon555.github.io/react-board-game and run
npm build
then
npm deploy
but still no images. I've also specified the homepage in the package.json:
"homepage": "http://ryandixon555.github.io/react-board-game"
In the end I gave up and deployed using netlify, following this link and then copying my code over.
Related
I am trying to deploy my react app but its not deploying anywhere, I have tried on Github pages, Heroku and Netlify. This is the repo link please someone help.
LINK:- https://github.com/harsh021102/hackat1
Heroku works. https://murmuring-anchorage-77354.herokuapp.com/
1- remove "homepage" from your package.json
2- npm run build
3- copy example project https://github.com/aydink88/heroku-express-spa
4- replace the example project build folder with your build folder
5- push only the express project repo to heroku (netlify and github doesn't work this way)
I'm trying to deploy a project so I did an npm run build and after it to check it I did serve -s build.
but when I'm checking the building one I get a blank page but in the regular project(not build), it is working fine.
I tried to see if its a problem of routing but didn't found.
Repo
I deployed it anyway so you can see.
Deploy of blank Page
In Package.json
Replace from
"homepage": "http://ethanolle.github.io/coca-cola"
to
"homepage": "."
The react app is not building using the homepage tag in package.json file . "homepage":"https://entrepreneurcell.com" . After running npm run build , this is what I am getting in console :-
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
Please tell me a more efficient way of deploying react app on hostinger or highlight the mistake that i am doing.
How can one deploy a create react app to gh-pages?
My packages.json folder has my homepage listed exactly as this: "homepage": "https://mgcraig78.github.io/RoboFriends",
However, the app will not deploy to gh-pages, and when I enter npm run build, the terminal tells me this (which I'm assuming is the issue, but I can't figure out how to fix it): The project was built assuming it is hosted at /RoboFriends/. <- this obviously is not the homepage I have entered into my packages.json file.
Remove the /RoboFriends from your homepage link in package.json to:
"homepage": "https://mgcraig78.github.io"
Then run
npm run build
What you deploy to github is what's inside the build folder that contains index.html
before deploy, on the localhost
after deploy, on the github pages: https://joo168.github.io/goal_tracker/
it's react.
before deploy, on the localhost, it works.
but after deploy using github pages, there are nothing on the page..
as you can see, NOTHING
why did it happen?
i did
yarn build
yarn run deploy
package.json