简体   繁体   English

反应-创建我的创建应用程序部署问题很奇怪

[英]react- create my create app deploy issues weird

so I have been trying for the last 2 hours to deploy an app on github pages.所以我过去 2 小时一直在尝试在 github 页面上部署应用程序。 following several tutorials/// and so far as i can tell, the issue that is happening causing the 404 is github is looking for a index.html file in the root... however the index.html file is in the public folder...遵循几个教程/// 据我所知,导致 404 的问题是 github 正在寻找根目录中的 index.html 文件...但是 index.ZFC35FDC70D5FC69D269883A8 中的公共文件夹..

so my question is, after looking at about 12 tutorials, no one mentions any other steps other than...所以我的问题是,在看了大约 12 个教程之后,没有人提到任何其他步骤...

make sure you have a io repo... done.确保你有一个 io 回购......完成。 make the json file changes,更改 json 文件,

  "homepage": "https://altruios.github.io/colorClicker",
  "scripts": {
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build",
    //other stuff etc...
    }

install gh-pages... done.安装 gh-pages... 完成。

  "devDependencies": {
    "gh-pages": "^3.0.0"
  }

make sure you have a repo for the app... done.确保你有一个应用程序的回购......完成。

npm run deploy.... done... it says published, with no errors or indication something went wrong. npm 运行部署....完成...它说已发布,没有错误或指示出现问题。

after these steps that are repeated everywhere with little variation, I have yet to get it deployed successfully.这些步骤在各处重复,几乎没有变化,我还没有成功部署它。

the altrious.github.io is online, if I add an index to the root of the colorClicker repo github directs to that... altrious.github.io 在线,如果我在 colorClicker 存储库 github 的根目录中添加索引,则指向...

I don't understand what exactly I'm missing.我不明白我到底错过了什么。

I have followed several tutorials, multiple times now, none of which resulted in a success, or really gave any insight to a missing step.我已经多次学习了几个教程,但都没有成功,或者真的对缺失的步骤有任何见解。

where am I going wrong / what am I missing.我哪里错了/我错过了什么。

https://github.com/altruios/colorClicker https://github.com/altruios/colorClicker

is the repo I'm trying to get on github pages...是我试图在 github 页面上获取的存储库...

(this is my first time doing this, so clearly I'm missing some key knowledge somewhere) (这是我第一次这样做,所以很明显我在某处遗漏了一些关键知识)

so I finally figured it out.所以我终于想通了。 there was a step that one tutorial had, that most seemed to miss.一个教程有一个步骤,大多数人似乎都错过了。 is which branch is published...是哪个分支发布...

正确的

before I had it publishing from the master.在我从主人那里出版之前。 and the GH-pages branch is the correct branch to publish from. GH-pages 分支是发布的正确分支。

hopefully this helps others from tearing out their hair.希望这可以帮助其他人不要扯掉头发。

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

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