#cant publish a react app on github

29 messages · Page 1 of 1 (latest)

deft ingot
#

I've followed so many videos, but i always get this error and no gh-pages appear on branch in github,

Error: Failed to get remote.origin.url (task must either be run in a git repository with a configured origin remote or must be configured with the "repo" option).
at D:\All Work\Projectswork\fitnessapp\node_modules\gh-pages\lib\git.js:214:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

wraith hedge
#

Share your repo link let's see what I can do.

deft ingot
wraith hedge
#

done dude

#

The thing which is causing you this error is that you didn't use the correct homepage link in package.json and also after doing everything you must execute command npm run build this will create a new branch named gh-pages.

After creating this you have to go to the settings on gibhub choose pages from side panel and then do as this document have sugeested.

https://github.com/gitname/react-gh-pages/tree/master

GitHub

Deploying a React App (created using create-react-app) to GitHub Pages - gitname/react-gh-pages

deft ingot
deft ingot
wraith hedge
#

Add me in your repo as a contributor and I'll fix that for you. Sounds good ?

deft ingot
#

this urs

#

if this urs i added yoiu jus incase im out

wraith hedge
deft ingot
wraith hedge
#

ok

#

done

#

now go to settings

deft ingot
#

ye

wraith hedge
#

choose pages

deft ingot
#

how did u manage to do it

wraith hedge
#

it was simple actually i just need to change the name and homepaeg link in the package.json and run the command npm run build which eventually creates the gh-pages branch.

By the way I am web deevloper teacher also.

deft ingot
#

was it not meant to be caps L

#

for the url

wraith hedge
#

the url was okay sometime the postioning throw errors when it comes .json

#

also don't forget to follow me on github 💪

deft ingot
#

gochu thanks so much

wraith hedge
#

np, if you need help just DM me