GH-pages를 설치한 사람에 대해서는 Github의 gh-pages를… 하단의 내용 오류와 제 React Project의 패키지 내용에 관한 오류입니다.
오류 메세지
C:\workSpace\cafe-apps>npm run deploy
> cafeapps@0.1.0 predeploy
> npm run build
> cafeapps@0.1.0 build
> react-scripts build
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
47.18 KB (+4 B) build\static\js\2.f2c0369f.chunk.js
23.38 KB build\static\css\2.a75f5a2c.chunk.css
3.33 KB (+1 B) build\static\js\main.fdd99a31.chunk.js
2.23 KB (-31 B) build\static\css\main.a44b650e.chunk.css
1.73 KB (+1 B) build\static\js\3.983e49b9.chunk.js
1.17 KB build\static\js\runtime-main.a7fb9a97.js
The project was built assuming it is hosted at /cafe-apps/.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
Find out more about deployment here:
https://cra.link/deployment
> cafeapps@0.1.0 deploy
**> gh-pages -d build
events.js:377
throw er; // Unhandled 'error' event
^
Error: spawn git ENOENT
React Projcet 내의 package.json 내용입니다
{
"homepage": "https://kevinjuniors.github.io/cafe-apps/",
"name": "cafeapps",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
"bootstrap": "^5.1.3",
"react": "^17.0.2",
"react-bootstrap": "^1.6.4",
"react-dom": "^17.0.2",
"react-media": "^1.10.0",
"react-responsive": "^9.0.0-beta.4",
"react-scripts": "4.0.3",
"web-vitals": "^2.1.2"
},
"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"
}
}
이 게시판에 글을 올리기 전에 구글링해서 비슷한 오류 사례들을 참조해서 조치를 취해봤지만 여전히 해당 오류를 해결 하는데는 성공하지 못하고 계속해서 삽질 중입니다 ㅠㅠ