Heads up to anyone using Vite instead of create-react-app. Vite creates a "dist" folder instead of "deploy" on build so you need to add "deploy": "gh-pages -d dist" instead of "deploy": "gh-pages -d deploy" when adding to scripts. If you don't do this Vite won't locate the "build" folder and the gh-pages branch will not get created.
@vanodee97579 ай бұрын
You're an amazing person. thank you for this. Been struggling for an entire afternoon.
@Code.J9 ай бұрын
Thank you very much! :D
@iberry26898 ай бұрын
THANK YOU SO MUCH 😭
@arkansavalder7 ай бұрын
🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵
@kasho_ali7 ай бұрын
Thank you so much 😭😭😭❤️
@artisticdevelopment71812 жыл бұрын
As a self-taught developer it warms my heart to find someone that explains things so well. Thank you thank you thank you.
@hopevandyne3258 Жыл бұрын
I AGREE!!! Tutorials r usually people giving the steps without any explanation as to why we’re doing it.
@gcsandesh2 жыл бұрын
I searched for this problem everywhere, finally this video helped me solve the problem of deploying the react app. When I deployed the app I would get a blank page on the github page. But I followed your steps and it worked. The key is to 1. "put the scripts in order" and 2. "put the homepage url correctly".
@liliyao3172 жыл бұрын
I faced the same problem, and after following this tutorial, I still got a blank page... 🤣
@keldrogo175 Жыл бұрын
@@liliyao317 did you find a solution to that ?
@dylaneamos Жыл бұрын
@@liliyao317 Same man. I AM STILL GETTING A BLANK PAGE AND I DO NOT KNOW WHY and it's irritating hahaa. Incase you found the solution please share.
@anon00s Жыл бұрын
worked for me ty
@bryan.gonzales11 ай бұрын
bro i just did it and i got the same white blank page. been at this the whole day@@dylaneamos
@rococococoa2 жыл бұрын
Thanks! I want to get faster and faster at deploying a static react frontend build, so I will try this out (though I wasn’t able to find a related repo linked).
@PedroTechnologies2 жыл бұрын
Thank you for the support! I don't remember why I didn't put the link in the description but here it is: github.com/machadop1407/chartjs-react-tutorial
@solice3473Ай бұрын
2 years later, still works perfectly. Thank you so much!
@AlamMahmood2 жыл бұрын
Man you saved my life. I created an application on React but was having hard time to deploy to github pages..u helped
@jasimrazamomin31177 ай бұрын
I rarely leave any comments on any video but this worked perfectly for deploying my portfolio. Thank you so much! It took me hours and hours of googling and installing stuff and doing complex things that didn't work but this worked on its first go. Once again thank you for making such a great and straightforward video!
@ROGUE.1192 жыл бұрын
I read docs, digged stack overflow, etc for 3 hours plus to get by website up, ended up watching your video and voila! Thanks a lot chief, subbed!
@ummi729210 ай бұрын
I was so lost, confused, distraught because i was facing a roadblock with this deplyment part ...UNTIL i found this !! cant thank you enoough ! May you be blessed!
@visheshmp2 жыл бұрын
So if anyone wants to know how to keep updating the gh-pages with main branch then you have to simply do one thing : update your main branch and commit changes.. once it is done then .. again run the command in terminal : npm run deploy now after you will run this command it will update the gh-pages automatically Thank you
@andresfelipecanobotero88142 жыл бұрын
When I do 'npm run deploy' I get the following error: 'gh-pages' is not recognized as an internal or external command, operable program or batch file. This is after successfully deploying my site and pushing changes to the main branch. Does anyone know why? EDIT: Figured it out, gotta make sure 'gh-pages' is in your dependencies in the package.json file. If not, gotta rerun ''npm install gh-pages' and try 'npm run deploy' again!
@visheshmp2 жыл бұрын
@@andresfelipecanobotero8814 Oh great! I was about to answer.
@felipenegreiros1914 Жыл бұрын
@@visheshmp I got a different error: npm run deploy> ENOENT: no such file or directory, stat 'G:\programing\portfolio\portfolio\build' PS G:\programing\portfolio\portfolio>
@trexon2360 Жыл бұрын
@@felipenegreiros1914 in your package.json file you edited, change "deploy": "gh-pages -d build", to "deploy": "gh-pages -d dist" when you you run build, it builds into the dist folder and not the build folder
@shadowysuper-coder612011 ай бұрын
@@trexon2360 thank you so much for this reply, I fixed the ENOENT error and now have the Published message at the end ❤❤
@shirouF Жыл бұрын
My deployed site showed a blank page, and using HashRouter instead of BrowserRouter in my index.js file fixed the issue. Hope this helps anyone else facing the same thing. Thank you for the well put video!
@ObserveEveryMove21 күн бұрын
Worked seamlessly Thank you!!! Self taught and had no problems with the directions. Clear and concise.
@juan83xd Жыл бұрын
Thank you! I have been trying to deploy my app for hours. Your tutorial was the only one that worked for me. Thank you.
@waelsta31032 жыл бұрын
Ure my age and honestly ure such an inspiration … keep going man i love your videos
@PedroTechnologies2 жыл бұрын
Thank you hahaha If it serves as motivation, I started learning react in the beginning of 2020 so you can learn a lot in a small amount of time!
@ayotunde91832 жыл бұрын
Thank you for this video Pedro. I deployed my react app to GitHub page and all it's showing is a blank page. Please what could be the error here?
@rorocyr64502 жыл бұрын
im having the same problem'
@mukulvishwakarma35852 жыл бұрын
Found any solution?
@DungLearnThings Жыл бұрын
I love you man :)) not only did you show us how to deploy but also explain some "aside" things and i like that
@febindevassia333 Жыл бұрын
Thank you so much for this bro. I'm an aspiring react developer from KERALA,INDIA. This video helped me a lot to deploy and publish my website properly . Thanks a lot.
@sonishn52222 жыл бұрын
Its great tutorial Thank you. But you missed one Point. For those who are getting White screen make sure to add your repository name in route like this this will prefix '/' with reponame
@sonishn52222 жыл бұрын
@playmaker you are trying to read undefined value..check from which component your getting this error from. If your seeing this error only after deployment..may be you will have check filepaths used in that component
@josephjose82922 жыл бұрын
@@sonishn5222 i deploy react app using github pages but it returns default error page in this project. can you help me😢
@dylaneamos Жыл бұрын
Bro I have followed even this way but I still see white screen.
@dylaneamos Жыл бұрын
@@sonishn5222 What do you mean by filepaths? What could be wrong?
@luan_ferreira_2 жыл бұрын
Thank you so much my guy, I looked for several videos here from my region Brazil, and none really helped me, yours was the most complete and correct, and by the way, your name "Machado" is the same as an important Brazilian writer Machado de Assis.
@Hacking-NASSA-with-HTML2 жыл бұрын
Thank you, sir, So Much👍! You are my Hero! So simple and easy in ten minutes to deploy an app with your guidance! I have my first react app deployed to gh-pages🤝 it works ✅
@kalinaszek Жыл бұрын
helped me done task on deadline, great video, straight to the point
@DreCode107 ай бұрын
First tutorial that actually worked for me, I appreciate it
@terribletruth82012 жыл бұрын
Tip: If you get a fatal error along the lines of "fatal: A branch named 'gh-pages' already exists", delete the folder in: node_modules/.cache/gh-pages VSCode kept giving me that error despite that branch not showing up in the repo anywhere. Deleting the folder and rerunning the deploy command worked.
@pranit8437 Жыл бұрын
thanks a lot for this
@felixmarvelian611811 ай бұрын
i cant find .cache
@felixmarvelian611811 ай бұрын
how to fix i even delete everything that says gh-pages and still says alredy exists
@p.rusinov8732 Жыл бұрын
Thanks a lot! Best react course i've seen on youtube keep going!
@stodani Жыл бұрын
5:49 i don't have any of those script tags.. i only have ""test": "echo \"Error: no test specified\" && exit 1" inside "script{ }". Should i deleta that one and type all the tags you have in there?
@stransey2 жыл бұрын
Thanks, your tutorial is better than all i found in the internet
@dailyvictoryy86332 жыл бұрын
Loved the video Pedro. The way you teach, I can tell that you fully understand the things that you teach because of how simple you explain it. Even a 7 year old would be able to understand.
@yashraj65652 жыл бұрын
After 15 min, my site is still not appearing on given link by the gh pages!...
@Verakissyou173 күн бұрын
You are the best teacher! Thanks for your help!!!
@anselmpeter2 жыл бұрын
Today I deployed my site after the efforts and learning of many days. Thanks to PedroTech for this awesome very straightforward video to help me through the way.
@누렁이-d4p Жыл бұрын
I spent three hours alone but thanks to this video I solved problem at once Thank you very much
@abdullahm6238 Жыл бұрын
i have been searching for this for ages
@YummyJiu2 жыл бұрын
谢谢!
@PedroTechnologies2 жыл бұрын
Thank you!!
@nabilhaouam84972 жыл бұрын
thank you , this helped so much I've never used github pages before and this tutorial made it easier
@liliyao3172 жыл бұрын
Thank you so much! I finally got my pages after so many tries.
@DanielMoreno-lc9bx Жыл бұрын
I really appreciate your help, now I have a question, what if I want to deploy it with a back-end and database? I guess with the back-end is pretty similar, but what for the database? Thank you.
@ahmed72532 жыл бұрын
Thank you very much. but if I have a node JS server, what should I do?
@shinobi_coder882 жыл бұрын
If you have a NodeJs server (Backend), you can deploy it somewhere like Heroku or similar and deploy your React App (Frontend) to Gh Pages as normal
@ahmed72532 жыл бұрын
@@shinobi_coder88 ok thx 💙
@PedroTechnologies2 жыл бұрын
Yeah, what Benedict said is correct! You upload the backend to something like heroku and then just change the api call url's to be the heroku url
@earpoon2 жыл бұрын
@@PedroTechnologies how can i hide my password to my mongodb atlas database in my backend before i upload it to heroku?
@notfahadh11 ай бұрын
where did you get the codes to enter in terminal?
@AyseHauck Жыл бұрын
thank you so much i was struggling with this for a while ! this is the easiest video to follow!
@codingwithkenny64922 жыл бұрын
Thank you so much! I used to struggle so much with the entire process involving using the terminal. This is the best tutorial I've found and it was also very easy to follow along! You just earned a new subscriber 😉
@Ninboy_1 Жыл бұрын
How do you get to the quick setup page to copy that text 3:02
@PatrikRasch Жыл бұрын
Here again after finishing my newest project, thank you again! 😂👏
@ankushchavhan13322 жыл бұрын
Intro music is refreshing 🤩
@PedroTechnologies2 жыл бұрын
I think so too hahaha
@sayyedsameerbasir2593 Жыл бұрын
Really helpful video, you solved the problem for which i m struggling from last 1 month
@marcosmeneghetti32612 жыл бұрын
Obrigado, Pedro, pelo super tutorial. Estou aprendendo bastante contigo. Forte abraco.
@aabhasjain962 жыл бұрын
Thanks Pedro for everything, I am loving your content. From last one week I have started watching your videos and there isn't a single day when I haven't watch your video. Thanks once again ❤❤
@leviackerman15212 ай бұрын
Hey man i upload site and its done but when i click on link for my web site it shows a empty white page what should i do ?
@fichanegratt2 жыл бұрын
How can I deploy a create-react- app with react router dom in github pages?
@PedroTechnologies2 жыл бұрын
There is a component called HashRouter in react router. Try replacing the BrowserRouter component (also called Router) with the HashRouter component.
@ylahti68 ай бұрын
Thank you! I've been battling this issue for the WHOLE DAY - I'm such a noob D:
@zzzzzzzzzz35672 жыл бұрын
You are amazing. The way you explain is so clear and easy to follow. Thank you so much!
@kritidwivedi77442 жыл бұрын
THANKYOUUUUUUUU, HAD BEEN STRUGGLING A LOT FOR THIS
@kayraczerniewicz5047 Жыл бұрын
Thank you so much! excelent tutorial, been looking for this everywhere!
@samuelsolomon3482 жыл бұрын
hey there great tutorial, but i have one question, when i opened link it immediately took me to my "missing" page instead of my "home page", i had to redirect the page to the homepage, is that normal
@vyvxxxx Жыл бұрын
If you are having issues with: no such file or directory, stat ... /build Change deploy script to: "deploy":"gh-pages -d dist"
@lucasmacielptu Жыл бұрын
Im currently having this problem, but if i try this correction it just says "ENOENT: no such file or directory, stat 'D:\.....\dist'", not sure how to fix it :(
@six21012 ай бұрын
why I cant see the content of my web? its always white background
@moonchild_아포방포2 жыл бұрын
Thank you so much for the video. This helped me a lot. I didn't knew the script order was the issue.
@ramb65002 жыл бұрын
thanks so much very simple and easy language you explain ,search so many videos but this is best one thanks ...
@PedroTechnologies2 жыл бұрын
Glad it helped!
@MeriThrash2 жыл бұрын
Thanks dude! I couldn't find a decent tutorial and this helped a lot. I'm suscribing right now and I'll surely look your other videos. Thanks you soooo much!
@vantal4115 Жыл бұрын
thank u so much .. i am in love with your teaching
@vijayarajfullstack Жыл бұрын
Thank you , Good explanation , Love from India
@OddSpeech Жыл бұрын
This helpped more than the documentation
@vivianeups2 жыл бұрын
Great, thank you so much! It worked to me to deploy my first react-app!!
@asaventurasderobson2 жыл бұрын
Thank you man, that is an absolutely great tutorial, hard to find these days.
@t-uzithehunterxx5879 Жыл бұрын
sabia que tu era br!! muito bom teus videos, o curso de react pra iniciantes me deu uma ajuda absurda. valeu pedro tech, tamo junto
@griffinkirkland9087 Жыл бұрын
muito bom, gosto do conteúdo dele
@TheJockerproductions2 жыл бұрын
Litteraly the best explanation i found so far! thank you so much
@EllanaTs2 жыл бұрын
Thank you for your video! I did all the steps, but my images are not displayed. They worked fine in local host 3000. Any suggestions?
@PedroTechnologies2 жыл бұрын
Glad it helped! For the images, make sure they are matching the exact name, gh-pages is case sensitive
@muhammadahmed5772 Жыл бұрын
@@PedroTechnologies thank you very much, but they aren't displayed too
@umaimafaisal63962 жыл бұрын
You saved my life, thank you for existing
@chandrashekharbhagat2435 Жыл бұрын
very clear and smooth explanation , thanks buddy!
@shivsaxena90 Жыл бұрын
that's what I was looking for thank you (dhanyawad)
@lewisstrongofficial2 жыл бұрын
I deployed a personal website using the steps in this video but I had a couple issues. 1. My homepage isn't showing my tags so there is basically no content except a footer component and navbar component I made. 2. None of the URLs in my navbar load. They simply return a 404 error.
@srinivijay5002 Жыл бұрын
same issues for me too.....only navbar is showing no other components.....have you solved it???? Please answer....
@nargizasainazarova7427 Жыл бұрын
@@srinivijay5002 i have the same problem, its because react router dom is used, and now url is different. He proposed to use HashRouter instead of BrowserRouter, now its ok on localhost, but it didnot help on gh-pages, i have the blank page. did u solve the problem?
@tomjohansson3520 Жыл бұрын
I followed this video and was surprised at the ease to follow along. Now i have a working github page where i can document my progress as i learn to code. i would love to see a follow up on how to add a github action to check if code is working before building
@PepperoniePlaysКүн бұрын
e os br que nao falam ingles pedrao kkkkkkkkkkkkkkk salvou demais irmao vlw pelo video
@PedroTechnologiesКүн бұрын
Kkkkkkkk vlww!
@mohammedammarkurabi7520 Жыл бұрын
Many thanks. Excellent tutorial
@ajaybisht16582 жыл бұрын
You made this so easy, thanks a lot
@vasilemidrigan502 жыл бұрын
Thank you so much, I spent all day and finally did it!
@idanlib2 жыл бұрын
Hey pal, thanks for the video! Does the process necessitate having a new repo, or can I deploy to an existing repo? I have an exiting github pages (based on a repo), and I'd like to deploy to that, as opposed to creating a new repo.
@bestakuma112 жыл бұрын
I appreciate...i love the part u talked about running "npm deploy" so many times.
@sahoodmzr88922 жыл бұрын
thank you bro you helped me to publish my first react app, even if i failed several times watching other tutorials , may be it is my fault as i failed
@PedroTechnologies2 жыл бұрын
Not your fault, we all fail in the beginning!
@roelineburger91722 жыл бұрын
This is amazing!! If I make changes to the repo, do I run the deploy script again for the changes to reflect?
@許潤璋2 жыл бұрын
I thank you for this tutorial. It helped me a lot to deploy React apps. 10 bows to you.
@devstuff922 жыл бұрын
I love your videos man, I can't thank you enough! Question though, totally new with React here, we don't need to use" npm react build" before deploying our app to a github repository?
@MeitoShirogane7 ай бұрын
you literally saved my day, thank you so much
@lhomme_flaneur Жыл бұрын
thank you man! that helped me a lot! keep postin
@fotios49022 жыл бұрын
Good that you mention that it takes a while after the page is actually visible in the address.
@Lik4nGaming2 жыл бұрын
Hi, first let me say thank you for the guide, it worked perfectly. Now, let's say i changed something in my project, do i need to only push to github or do both push and the run deploy command?
@UAV_Musafhir8 ай бұрын
youre amazing bro. simple steps. Tysm
@nurdanokcu3906 Жыл бұрын
Loved it , very easy to understand. Thank you.
@MrBox4soumendu Жыл бұрын
You are always a boss, following you from long back. ❤
@이름-f9z2 жыл бұрын
Thanks for the tutorial. Q) What if i make changes in my repo? should i push to my main branch then npm run deploy? or just git push origin main not sure about the process whenever i make a change
@trexon2360 Жыл бұрын
just do a normal push to the same branch you initialy comitted to then rerun deploy comand
@PatrikRasch Жыл бұрын
Thank you man!
@World_information55682 жыл бұрын
Sir your videos are very very helpful 🙂
@PedroTechnologies2 жыл бұрын
Glad to hear that!
@HammedJimoh-vm8tt Жыл бұрын
the homepage value does not have "s" after http. Does it count?
@Matt_Kumar Жыл бұрын
Thank you for the video, it was easy to follow and I was able to get my page up with ease!
@djlastnight1 Жыл бұрын
Very usefull video! Thx
@PixieTalesPoems Жыл бұрын
You've earned yourself a subscriber sir !! you are amazing
@JoseGomez-ie3mi8 ай бұрын
You are amazing.. So well explained.
@geosystems2106 Жыл бұрын
Thanks for the video !! Is this "gh-pages" the only way to deploy or is there another direct way to do this ?