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

235
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 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