简体   繁体   English

React 应用程序 gh-pages 显示空白,不知道该怎么做

[英]React app gh-pages displaying blank, not sure what to do

I deployed my react app on gh-pages.我在 gh-pages 上部署了我的 React 应用程序。 I thought I followed all the instructions, but when I open the link it's blank.我以为我遵循了所有说明,但是当我打开链接时它是空白的。 Any guidance would be great.任何指导都会很棒。

Here is the deployed link: Website这是已部署的链接:网站

Here is the repo: Github这是回购协议: Github

I'm not sure what screen grabs would be useful, I'm not seeing anything in the console or anything odd in network.我不确定什么屏幕抓取会有用,我在控制台中没有看到任何东西,也没有在网络中看到任何奇怪的东西。 在此处输入图像描述 在此处输入图像描述

It runs locally without any errors either.它在本地运行也没有任何错误。 If I'm lacking information please let me know what would be helpful.如果我缺少信息,请告诉我有什么帮助。 I followed the steps I found for react gh-pages and googled what I could but I'm at a loss.我按照我找到的反应 gh-pages 的步骤进行操作,并用谷歌搜索了我能搜索到的内容,但我不知所措。

npm install gh-pages --save-dev

https://{username}.github.io/{repo-name} https://{用户名}.github.io/{repo-name}

+   "predeploy": "npm run build",
+   "deploy": "gh-pages -d build",
npm run deploy

One thing I saw said to use Hashrouter, so I tried that.我看到一件事说要使用 Hashrouter,所以我尝试了一下。 I tried from a new repo thinking maybe I'd done something incorrectly the first go around so I went step by step again.我尝试从一个新的回购协议开始,我想也许我第一次做错了什么,所以我又一步一步来了。 Help.帮助。

I think you need to do this in App.js:我认为您需要在 App.js 中执行此操作:

<Route path="/erika.zibelnik" element={<Home/>}>

Also, not sure if this error in the Console is related:另外,不确定控制台中的此错误是否相关:

Origin trial controlled feature not enabled: 'interest-cohort' in static HTML page 未启用原始试用控制功能:静态 HTML 页面中的“兴趣队列”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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