无法在 GitHub gh-pages 上部署 React 应用程序
can't deploy react app on GitHub gh-pages
我已经在 github 上部署了我的 React 应用程序,但它不是 运行。
https://kinza98.github.io/Todo-List/
谁能告诉我为什么我收到错误 加载资源失败
在 package.json
中进行以下编辑并再次尝试部署它。
{
"name": "todo-react-basic",
"version": "0.1.0",
"private": true,
"homepage": "https://Kinza98.github.io/Todo-List",
"dependencies": {
"@loadable/component": "^5.14.1",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"gh-pages": "^3.1.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-id-generator": "^3.0.1",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"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",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
我部署了它,它是运行:Todo List
我已经在 github 上部署了我的 React 应用程序,但它不是 运行。 https://kinza98.github.io/Todo-List/ 谁能告诉我为什么我收到错误 加载资源失败
在 package.json
中进行以下编辑并再次尝试部署它。
{
"name": "todo-react-basic",
"version": "0.1.0",
"private": true,
"homepage": "https://Kinza98.github.io/Todo-List",
"dependencies": {
"@loadable/component": "^5.14.1",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"gh-pages": "^3.1.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-id-generator": "^3.0.1",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"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",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
我部署了它,它是运行:Todo List