Create React Project (CRA)

homewiz·2023년 11월 11일
1

CRA create react app

목록 보기
1/6
post-thumbnail

개요

CRA를 이용하여 리액트를 설치 하는 방법 소개

준비물

> npm install -g yarn

프로젝트 생성

yarn create react-app react-first
yarn create v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-react-app@5.0.1" with binaries:
      - create-react-app

Creating a new React app in C:\Projects\Sources\react-components.

리액트 실행

> cd react-first
> yarn start

관련글: 코딩룰 설정

https://blog.naver.com/code7004/223260244994

tip.warning code

실행후 아래와 같은 warniing code 발생시

One of your dependencies, babel-preset-react-app, is importing the
"@babel/plugin-proposal-private-property-in-object" package without
declaring it in its dependencies. This is currently working because
"@babel/plugin-proposal-private-property-in-object" is already in your
node_modules folder for unrelated reasons, but it may break at any time.

babel-preset-react-app is part of the create-react-app project, which
is not maintianed anymore. It is thus unlikely that this bug will
ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
your devDependencies to work around this error. This will make this message
go away.

@babel/plugin-p... 요넘이 없다고 하는 내용이니 추가 해준다.

> yarn add --dev @babel/plugin-proposal-private-property-in-object

0개의 댓글

관련 채용 정보