在github上部署我的反应应用程序

时间:2018-03-12 21:43:14

标签: reactjs npm github-pages

我有一个主分支和gh-pages。

当我的一位朋友开发我时,我能够在gh-pages上看到它。

我尝试将gh-pages与master合并以添加我所做的样式,并且它搞砸了github的可查看应用页面。

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
    "precommit": "lint-staged",
    "build": "node build.js", 
    "deploy": "npm run build && git-directory-deploy --directory _build/"
  },
  "homepage": "https://marianapt.github.io/reduxTable/",
  "lint-staged": {
    "*.{js,json,css,md}": ["prettier --write", "git add"]
  }

那是我的package.json

我执行npm install以确保全部更新..

自从我合并了master和gh-pages之后,我无法看到我的应用程序,我回到了自述页面。 https://marianapt.github.io/reduxTable/就是链接...

1 个答案:

答案 0 :(得分:0)

我不明白你真的发生了什么,但我认为问题是你在合并时丢失了你的prad app.js。 只需尝试运行npm run build并再次推送到github 希望这会对你有所帮助。

相关问题