我用react创建了一个管理应用程序,与我的netflix克隆应用程序配合使用。我正在尝试部署这两个网站。我没有得到任何错误,只是一个空白的白色屏幕。我的版本发布了,我不明白为什么我只得到一个空白的白色屏幕。
我在netlify和github页面上部署,在两个部署中,我都得到了相同的白色屏幕。
我在package.json文件中添加了“homepage”:“http://JohnSolomou.github.io/admin/”,在我的脚本中我添加了以下内容:
"scripts": {
"start": "react-scripts --openssl-legacy-provider start i",
"build": "react-scripts build --openssl-legacy-provider build i ",
"predeploy": "npm run build --openssl-legacy-provider build i ",
"deploy": "gh-pages -d build --openssl-legacy-provider build i ",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
我已经安装了gh-pages到我的依赖项。我还在Github页面的设置中选择了gh-pages
1条答案
按热度按时间e5nqia271#
我想明白了我的路由与部署的路由不匹配,所以我只需要将
/admin/
添加到我的主登录页面,并且在新的部署之后它可以正常工作。我也改变了我的主页网址回到它是在
package.json
到