-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm run build problem #604
Comments
you will need to use some kind of local server to get the app running.
cheers |
When you run
You need to run a static server for these files, just like you would need to do it in production. Opening just HTML file from I hope this helps! |
I still can not understand . I have seen the user guide,but not fully understand what the part about deploying means.the part is: After I run the And where should I executive the sequence of commands? the github pages repo root folder? |
The sequence of commands already pushes build folder to gh-pages branch (which is one of the ways to publish GH Pages, you don't need a separate repo). Have you tried running it in your project folder? There are two more alternatives:
Does this help? In either case don't forget to set |
@gaearon thank you so much. |
@gaearon your quick tutorial just helped a fresh react-developer deploy her portfolio site. |
@Shreiya You’re welcome! If you have any problems with this setup please feel free to file issues. |
Hi. I'm having the same blank page problem when trying to deploy my app on GH pages. I've tried the aforementioned steps but to no avail. Question, where do you put |
@BrianNW anywhere in the top-level object of package.json |
"homepage": "https://github.com/BrianNW/musicMaster", is not the correct setting. You need to use the deployment URL as the "homepage": "https://BrianNW.github.io/musicMaster", Additionally, you need to run If not, please file a new issue. |
I run the build file on apache serve but it display an empty page ,but the build js and css are sure loaded to the index.html. How can I solve the problem |
@linweili1201 This is not enough information to help you. Please see Deployment section in User Guide. |
@linweili1201 we have the same problem, just empty screen after app deployed on tomcat :( |
@shabetya Have you fully read and followed this section? Most problems happen when people miss a few things there. |
@gaearon I'm trying to deploy a react app for the first time. I have it running on localhost:3000 but want to move it to my website https:www.alliehowe.tech/hauntedHouse. When I run npm build run it successfully creates a build folder and I put the contents of the build folder in my host's file manager in the https:www.alliehowe.tech/hauntedHouse directory. However when I go to that url it's a blank white page. This is my package.json This is my created html file in the newly created build folder. It also may be worth noting that there is no bundle.js file in the build folder. Any ideas? Thanks in advance |
@BrianNW |
How can I deploy with nginx? It needs a static file, like index.html, to show when I access my url. |
I'm getting a blank page when i go to my URL. I had the same issue on another create-react-app but got it working by updating the homepage in the package.json file. I tried the same remedy with this create-react-app and its still not working. this is the package.json code:
I'm using godaddy cpanel file manager. The directory is correct there. Like I said I got the other one to work. not sure why this one isn't. not sure if you need more information to help troubleshoot. let me know. Thanks! |
@gaearon I built a site with create-react-app. After following some instructions to host it on heroku, i lost some of the css features.What i have when run on localhost is quite different with what i have on heroku. This is the site : https://vanhack-success.herokuapp.com/ Please what may be the cause.Thanks for your help |
@melitus you are apparently referencing the bootstrap base stylesheet with http, thus the browser is blocking the request for that particular stylesheet. https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css If that doesn't cut it, or you have any further questions, please consider opening a new issue as this one has been closed for quite a while. Cheers |
@daeschwed I have tried replacing the protocol with |
I have got my project done,but when I
npm run build
,I got the build folder,but when I open the index.html in build folder by chrome ,I just got a blank page,but actually I want to get it can be visual .the index.html codes in build folder like this:
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="shortcut icon" href="/static/media/favicon.fd73a6eb.ico"><title>React App</title><link href="/static/css/main.9a0fe4f1.css" rel="stylesheet"></head><body><div id="root"></div><script type="text/javascript" src="/static/js/main.f39a5fd1.js"></script></body></html>
what can I do to build the project?
p.s I have read the USER GUIDE ,but not get a perfect answer.
The text was updated successfully, but these errors were encountered: