在gh-pages上部署网站后得到空白页

时间:2020-07-08 12:08:30

标签: reactjs github deployment github-pages

我正在尝试使用react-gh-pages来部署我的网站。我正在尝试部署的仓库是公开的,但是在运行时:

npm run deploy

我得到的页面是一个空白网站,尽管构建正在通过。 在下面附加我的package.json文件并链接到我的网站。

{
  "name": "open-react-template",
  "version": "0.1.0",
  "private": true,
  "homepage": "https://vaibhavsethia.github.io/JPW_website/",
  "dependencies": {
    "bootstrap": "^4.5.0",
    "classnames": "^2.2.6",
    "gh-pages": "^2.2.0",
    "lodash": "^4.17.15",
    "node-sass": "^4.13.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-ga": "^2.7.0",
    "react-router-dom": "^5.1.2",
    "react-scripts": "^3.4.1",
    "reactstrap": "^8.4.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "deploy": "gh-pages -d build",
    "predeploy": "npm run build",
    "eject": "react-scripts eject"
  },
  "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"
    ]
  }
}

网站链接:https://vaibhavsethia.github.io/JPW_website/

0 个答案:

没有答案