[英]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.我正在为我的工作目的创建一个反应应用程序,并希望向客户端显示一些更改,在将其部署到
gh-pages
,它部署成功,但是当我尝试在给定域中访问它时,它只显示白色空白屏幕。
This is my site: https://devchaudhary78.github.io/explorer-react/这是我的网站: 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包.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 分钟来反映更改,现在可以正常工作了,我在它不工作时写了问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.