반응형
이번 글을 통해 배워갈 내용
- 리액트 앱을 깃 레포에서 풀 받아서 실행 하는 법을 알려드립니다.
1. 윈도우의 경우 CMD 창을 여시고
2. 받고자 하시는 디렉토리(폴더)로 이동합니다
예시
cd C:\learn
(폴더를 만드시고자 한다면 mkdir 폴더명 을 통해 만드신뒤 이동하시면 됩니다.)
3. 깃 클론을 합니다
git clone 레포url
예시
git clone https://github.com/songk1992/ppp_2021_summer_frontend
4. 다운이 다되면 cd를 이용해 다운받은 레포의 디렉토리로 이동합니다.
cd 디렉토리명
cd ppp_2021_summer_frontend
5. package.json 파일을 확인해서 script가 잘 써있는지 확인합니다.
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
6. lock 파일들, 예를들어 yarn.lock, package-lock.json 등이 있을 경우 전부 지워줍니다.
7. npm을 설치해줍니다.
npm install
8. npm을 실행해서 확인해줍니다.
npm start
추가 노트
npm 이 아닌 yarn으로 된 프로젝트의 경우 yarn start 등을 활용해 줍니다.
한참을 검색해도 안 나왔는데 다행히도 스택오버플로우에서 찾아서 배웠습니다.
출처 및 인용
https://stackoverflow.com/questions/47137086/starting-react-app-from-pulled-github-project
https://codemasterkimc.tistory.com/50
반응형
'Javascript > React' 카테고리의 다른 글
리액트로 틱택토 게임 만들면서 기초 배우기 # 5 (상호작용하는 Component 만들기) (0) | 2021.08.07 |
---|---|
리액트로 틱택토 게임 만들면서 기초 배우기 # 4 (props 사용하기) (0) | 2021.08.07 |
리액트로 틱택토 게임 만들면서 기초 배우기 # 3 (컴포넌트 틀 만들기) (0) | 2021.08.07 |
리액트로 틱택토 게임 만들면서 기초 배우기 # 2 (리액트 VirtualDom 조작해보기) (0) | 2021.08.06 |
리액트로 틱택토 게임 만들면서 기초 배우기 # 1 (리액트 설치) (0) | 2021.08.06 |