在React应用程序部署到github页面时出现问题

时间:2019-07-07 11:47:56

标签: reactjs github-pages

我按照多个教程部署了我的React应用,一切似乎都很好。但是,如果在部署后转到GitHub页面上的URL,则会显示以下内容:


sudojoseph.github.io
This project was bootstrapped with Create React App.

Available Scripts
In the project directory, you can run:

npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

等...

我的package.json看起来像这样:

{
  "name": "sudojoseph.github.io",
  "version": "0.1.0",
  "private": true,
  "homepage": "https://sudojoseph.github.io",
  "dependencies": {
    "gh-pages": "^2.0.1",
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-scripts": "3.0.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"
  },
  "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"
    ]
  }
}

我想念什么?

0 个答案:

没有答案