简体   繁体   中英

How to fix gh-pages showing blank white screen while using create-react-app build

I am creating a react app for my work purpose and want to show some changes to client, While deploying it to gh-pages , It deploys successfully, but when I try to access it at the given domain it is just showing white blank screen.

This is my site: https://devchaudhary78.github.io/explorer-react/

Things I have already tried:

1) Changed `BrowserRouter` to `HashRouter`

2) Added `homepage` to `package.json`

3) Changed the scripts as required

Package.json

"homepage": "https://devchaudhary78.github.io/explorer-react/",

"scripts": {
  "start": "craco start",
  "predeploy": "craco build",
  "deploy": "gh-pages -d build",
  "build": "craco build",
  "test": "craco test",
  "eject": "react-scripts eject"
}

更改上述内容后花了 5-6 分钟来反映更改,现在可以正常工作了,我在它不工作时写了问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM