React JS应用部署到Netlify/Render/GH Pages显示空白,本地正常
React应用本地运行正常,部署到Netlify/Render/GitHub Pages后显示空白
我被这个问题困扰了两周,尝试了多种修复方案但均无效。我的React JS应用在本地服务器运行完全正常,但部署到Netlify、Render以及GitHub Pages后页面显示空白。
相关信息:
- GitHub仓库:new-bnb-lab
- Render部署后效果:

- 本地运行效果:

我尝试过的修复操作:
- 修改
package.json,添加部署脚本:
"scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d build" }
- 先后设置
homepage字段为:"https://bilguun1130.github.io""https://bilguun1130.github.io/new-bnb-lab"
但以上操作都没能解决问题,页面仍然显示空白。
内容的提问来源于stack exchange,提问作者realibgun
相关产品推荐
相关产品推荐

