2

I'm trying to deploy create-react-app(which is currently on github) to netlify. after it deployed it shows a blank page.

Netlify configurations i have added: build command: yarn build, Publish directory: build

and this is my scripts on package.json

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build"
  },
Nipun Ravisara
  • 3,629
  • 3
  • 20
  • 35
  • 1
    Does this help? [Blank page after running build on create-react-app](https://stackoverflow.com/questions/55568697/blank-page-after-running-build-on-create-react-app) – hotpink Jan 08 '20 at 05:07
  • @hotpink yes i have tried with fresh create-react-app and it works fine. i think my folder structure is the matter here. – Nipun Ravisara Jan 08 '20 at 06:08
  • does your production build work locally? You can use the `serve` package and run `npm build && serve -s build` – hotpink Jan 08 '20 at 07:50
  • 1
    The problem was the file structure. it gives an black page when i build and serve it on locally. that's mean the deploying flow did't went wrong. then i format the structure again and build and serve it locally then it's fine with my new file structure. Thanks for your help. appreciate that ✨️ – Nipun Ravisara Jan 10 '20 at 01:12
  • 1
    Can you provide more details on what was wrong with the file structure. so that others can benefit – mvinayakam Aug 05 '20 at 07:46
  • It's just the default structure of create-react-app. In first place i was change it a lil bit but after this problem pops-up i had to change it back to default structure and then it worked. – Nipun Ravisara Aug 05 '20 at 14:45

1 Answers1

1

I was getting blank page only on mobile devices after deploying on Netlify. It worked after I removed REDUX DEVTOOLS EXTENSION from Redux store.

Ali Rehman
  • 3,731
  • 4
  • 23
  • 28