react 세팅

Mac/설정 2020. 1. 8. 10:39 Posted by 하얀나다

1. brew 이용한 node 설치

brew install node

2. 환경설정 해주기

cd ~
vi .bash_profile

i 눌러 insert 모드로 변경 후

export NODE_PATH="/usr/local/lib/node_modules"
export PATH="/usr/local/Cellar/node/노드버전/bin:$PATH"

작성 후 esc 눌러 insert모드 종료

 

:wq  저장후 종료.

node -v
npm -v

버전 확인.

 

3. yarn 설치

brew install yarn

4. vscode 설치

 

5. react 새프로젝트 만들기

$ npx create-react-app begin-react

6. 실행

$ cd begin-react
$ yarn start

7. localhost:3000으로 실행이됨.

react 프로젝트 실행 모습

vscode는 폴더열기로 begin-react 잡아주면

react프로젝트 오픈한 vscode 

이렇게 뜸.

'Mac > 설정' 카테고리의 다른 글

Mac에서 배치파일 만들기  (0) 2020.02.12
Mac 에서 Brew를 이용하여 mongoDB설치 하기  (0) 2020.02.12
Mac에 MongoDB를 설치 해보자.  (0) 2020.01.09
Mac PC 에서 brew 설치  (0) 2019.12.28