Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

173
Vistas
How do I publish my React site on Github Pages?

I'm trying to publish a React app to Github Pages but all that pops up is a blank page when I attempt it. I'm new to React and not very bright.

Here is what my package.json looks like:

"homepage": "[myusername].github.io",
  "version": "1.0.0",
"description": "Personal website simulating Google Search interface, developed with React",  
  "keywords": [    
  "react",    
  "personal website",
"google",
  "portfolio"  
  ],  
  "main":"index.html",
  "dependencies": {
  "@fortawesome/fontawesome-svg-core": "1.2.36",
  "@fortawesome/free-regular-svg-icons": "5.15.4",
  "@fortawesome/free-solid-svg-icons": "5.15.4",
  "@fortawesome/react-fontawesome": "0.1.15",
  "@material-ui/core": "4.12.3",    
  "@material-ui/icons": "4.11.2",
  "prop-types": "15.7.2",  
  "react": "17.0.2",
  "react-dom": "17.0.2",
  "react-router-dom": "5.3.0",
    "react-scripts": "^5.0.1",  
  "react-select": "4.3.1"
    },

  
  "devDependencies": {
"@babel/runtime": "7.13.8",
  "gh-pages": "^3.2.3"
  },  
  "scripts": {
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build",
  "start": "react-scripts start",
  "build": "react-scripts build",    
  "build-localhost": "PUBLIC_URL=/ react-scripts build",
    "test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"  
  },
  
  "browserslist": [  
  ">0.2%",  
  "not dead",  
  "not ie <= 11",  
  "not op_mini all"
  ]
}

I'm not sure what other info to provide, so I apologize in advance

Also, I didn't want to put my real name so that's why the homepage line looks like that here.

Please help?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I'm not sure if I get what you exactly mean. But if you want to push your existing project to github here is the steps:

1- create a new repository on github In Terminal, change the current working directory to your local project

2- then in your terminal write :

git init

Initialize the local directory as a Git repository.

3- git add . OR git add --all Commit the files that you've staged in your local repository.

4- git commit -m 'First commit' Commit the files that you've staged in your local repository.

5-git remote add origin <remote repository URL> Copy remote repository URL field from your GitHub repository, in the right sidebar, copy the remote repository URL.

In Terminal, add the URL for the remote repository where your local repostory will be pushed

6- git remote -v Sets the new remote.

7- git push origin master Push the changes in your local repository to GitHub


  • And if you mean by publish your project is deploying it you can follow these two links:

1- https://github.com/gitname/react-gh-pages

2- https://www.c-sharpcorner.com/article/how-to-deploy-react-application-on-github-pages/

the second one is a bit old but you can check the comments in bottom of the page.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda