Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!