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

234
Visualizações
Unable to host my react app on github. Unable to deploy

Pushed the app to GitHub, and completed other procedures like updating the package.json file.

Done with npm install --save gh-pages I think this might have something to do with folders because the react stuff is in 'client' folder and rest node, mongo is in the 'api'.

Still unable to deploy it.

package.json

{
  "name": "mern-todo-api",
  "homepage": "https://ShreyashDo.github.io/Full-stack-react-todo-app",
  "version": "1.0.0",
  "main": "server.js",
  "scripts": {
    "start": "react-scripts start",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build"
  },
  "author": "Shreyash Dongre",
  "license": "ISC",
  "description": "",
  "dependencies": {
    "cors": "^2.8.5",
    "express": "^4.17.1",
    "gh-pages": "^3.2.3",
    "mongoose": "^6.0.7"
  },
  "devDependencies": {
    "nodemon": "^2.0.12"
  }
}

I referred to https://create-react-app.dev/docs/deployment

Git-repo

Error SS

Folders SS

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Seems to be you are not in the right directory. You need to be inside the client folder where the package.json file with object called scripts which has key start, deploy and predeploy is located. You can try this on the terminal.

cd client
about 4 years ago · Juan Pablo Isaza Relatório

0

change your deploy in scripts object in package.json to :

"scripts": {
    "start": "react-scripts start",
    "predeploy": "npm run build",
    "deploy": "cd client && gh-pages -d build",
 },
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