Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

174
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda