Search
Duplicate
🐬

create-react-app(CRA) setting

간단소개
팔만코딩경 컨트리뷰터
ContributorNotionAccount
주제 / 분류
React
Scrap
태그
9 more properties

0. Install nvm

NVM(Node Version Manager)은 Node.js의 버전을 관리하는 도구이며. 협업을 진행할 때, 라이브러리 버전 호환 문제에 유용하게 사용할 수 있다.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
Plain Text
복사

1. Install Node.js (LTS)

LTS(Long Term Supprot) 버전은 안정적이고 신뢰도가 높은 버전이다.
nvm ls-remote
Plain Text
복사
위 명령어를 사용하면 현재 나와있는 Node.js 버전들을 확인할 수 있다.
nvm install --lts
Plain Text
복사
LTS 버전을 설치하려면 위 명령어를 실행
node -v
Plain Text
복사
정상적으로 Node.js가 설치되었는지 확인
npx
Plain Text
복사
위 명령어를 실행하여 CRA에 사용되는 npx도 작동하는지 확인

2. create-react-app(CRA)

CRA는 webpack, babel 등 React에서 많이 사용하는 도구 및 설정을 포함하며, React 개발 환경을 쉽게 구성하고 이용하게 해준다.
npx create-react-app my-app cd my-app npm start
Plain Text
복사
npx create-react-app my-app 명령어를 통해 project를 생성하고, 해당 폴더로 이동 후 npm start를 입력하면 된다.
성공! Enjoy React :)