Github页面返回React项目的空白页面

时间:2020-06-21 21:08:32

标签: reactjs github github-pages

我的react github页面显示为空白页面。我通过npm安装了gh-pages,并添加了

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

,并且首页是正确的地址: "homepage": "https://calebm5577.github.io/movie-search-app/" 将我的代码推送到可以正常工作的存储库没有问题,只有github页面显示为空白。

到目前为止,由于发现一个论坛帖子对我有所帮助,因此我将存储库的名称切换为小写。不幸的是,这没有用。

github页面:https://calebm5577.github.io/movie-search-app/ github代码:https://github.com/Calebm5577/movie-search-app

package.json:

{
  "homepage": "https://calebm5577.github.io/movie-search-app/",
  "name": "moviesearch",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.5.0",
    "@testing-library/user-event": "^7.2.1",
    "axios": "^0.19.2",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-scripts": "3.4.1",
    "reactstrap": "^8.4.1"
  },
  "scripts": {
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build",
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "compile:sass": "node-sass src/CSS/main.scss src/CSS/style.css -w"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "gh-pages": "^3.0.0",
    "node-sass": "^4.14.1"
  }
}

0 个答案:

没有答案
相关问题