为什么在gh页上部署的React应用程序在不同的浏览器上显示空白页,同时在我的浏览器上正确显示?

时间:2019-08-22 10:07:05

标签: reactjs redux github-pages

我已遵循github页面的部署说明,并且部署正确。但是,当我在另一个浏览器上打开主页链接时,它显示空白页。

下面提供了我的package.json文件

应用链接 https://abid413119.github.io/React-Redux-Todo-App/

{
  "name": "todo-app",
  "version": "0.1.0",
  "homepage": "https://abid413119.github.io/React-Redux-Todo-App",
  "private": true,
  "dependencies": {
    "@material-ui/core": "^4.3.2",
    "@material-ui/icons": "^4.2.1",
    "gh-pages": "^2.1.1",
    "material-ui": "^0.20.2",
    "react": "^16.9.0",
    "react-dom": "^16.9.0",
    "react-lottie": "^1.2.3",
    "react-redux": "^7.1.0",
    "react-scripts": "3.1.1",
    "redux": "^4.0.4",
    "redux-thunk": "^2.3.0",
    "uuid": "^3.3.2"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build"
  },
  "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"
    ]
  }
}

{ "name": "todo-app", "version": "0.1.0", "homepage": "https://abid413119.github.io/React-Redux-Todo-App", "private": true, "dependencies": { "@material-ui/core": "^4.3.2", "@material-ui/icons": "^4.2.1", "gh-pages": "^2.1.1", "material-ui": "^0.20.2", "react": "^16.9.0", "react-dom": "^16.9.0", "react-lottie": "^1.2.3", "react-redux": "^7.1.0", "react-scripts": "3.1.1", "redux": "^4.0.4", "redux-thunk": "^2.3.0", "uuid": "^3.3.2" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", "predeploy": "npm run build", "deploy": "gh-pages -d build" }, "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" ] } }

1 个答案:

答案 0 :(得分:-1)

它设置为PRIVATE。使其成为公共的!前往设置。在页面底部的危险区域部分。从那里使其成为公共的!然后重新部署您的应用程序!