0

我使用命令 npx create-react-app my-app --template typescript 创建应用程序。然后我做了所有步骤将它添加到gh页面 - 像往常一样 - 添加主页,脚本,部署它等。唯一的问题是它没有工作。它在我的项目上不起​​作用,所以我像这样创建了空的 cra,它也不起作用。我不知道有什么问题。页面显示信息

使用源“https://siemacotam.github.io/static/js/main.aa2ba350.js”加载失败。

这是 package.json

{
"homepage ": "http://siemacotam.github.io/portfolio2",
"name": "portfolio2",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.3",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.4.1",
"@types/node": "^16.11.25",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "5.0.0",
"typescript": "^4.5.5",
"web-vitals": "^2.1.4"
},
"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",
  "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"
]
},
"devDependencies": {
"gh-pages": "^3.2.3"
}

}

有任何想法吗 ?

4

0 回答 0