Сначала вы должны удалить gh
и pages
, а затем npm i -D gh-pages
Во-вторых, вы должны отредактировать homepage: ./
, и вы можете загрузить свой веб-сайт на GitHub.
Кроме того, это мой package.json
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"lodash-es": "^4.17.11",
"node-sass": "^4.11.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-redux": "^7.0.2",
"react-scripts": "2.1.8",
"react-spring": "^8.0.19",
"react-swipe-card": "^0.1.4",
"react-with-gesture": "^4.0.8",
"redux": "^4.0.1",
"redux-actions": "^2.6.5",
"redux-saga": "^1.0.2",
"vec-la": "^1.5.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"deploy": "gh-pages -d build"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"gh-pages": "^2.0.1"
}
}