部署到github页面时无法编译

时间:2019-11-10 11:39:20

标签: javascript reactjs github github-pages

我没有将任何网站部署到GitHub页面。这是我第一次尝试使用React。我已完成所有必要的先决条件,但是当我输入npm run deploy时,它显示以下错误:

enter image description here

这是我的package.json:

{
  "name": "tanmoy",
  "version": "0.1.0",
  "private": true,
  "homepage": "https://mygithub.github.io/repo_name",
  "dependencies": {
    "react": "^16.11.0",
    "react-dom": "^16.11.0",
    "react-scripts": "3.2.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build",
    "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"
    ]
  },
  "devDependencies": {
    "gh-pages": "^2.1.1"
  }
}

我找不到错误的出处。预先感谢。

0 个答案:

没有答案