티스토리 뷰
[React] React 프로젝트 생성과 실행
JoonPyo-Hong 2021. 7. 21. 21:08리액트 프로젝트 생성을 위한 프로그램 설치
1. Node.js
다운로드 | Node.js
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
nodejs.org

2. Npm / Yarn
Yarn
Fast, reliable, and secure dependency management.
classic.yarnpkg.com

npm install -g create-react-app
Written by JooPyo-Hong ❤️
npm install npm 설치
create-react-app React 프로젝트를 생성하는 명령어 설치
-g 시스템 공통 폴더에 설치해줘서 프로젝트 생성할 때 위 명령을 다시 입력할 필요가 없어진다.
3. Visual Studio Code
Visual Studio Code - Code Editing. Redefined
Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.
code.visualstudio.com

설치 후 확인
cmd 에서
npm -v
Written by JooPyo-Hong ❤️
yarn --version
Written by JooPyo-Hong ❤️
내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다. 문구가 출력 되면 제대로 설치가 되지 않은 것이다.
리액트 프로젝트 생성
Visual Studio Code를 켜서 Ctrl + k + o를 눌러 작업할 공간을 지정한다.

터미널을 생성 후 프로젝트 생성 명령어를 입력한다.

yarn create react-app 프로젝트 이름
Written by JooPyo-Hong ❤️

프로젝트 생성에서 오류 발생 시 - [React] 이 시스템에서 스크립트를 실행할 수 없으므로 ~ 파일을 로드할 수 없습니다.
터미널에 명령어를 입력해서 프로젝트를 실행한다.
cd 프로젝트 이름
Written by JooPyo-Hong ❤️
yarn start 또는 npm start Written by JooPyo-Hong ❤️

'[React]' 카테고리의 다른 글
[React] 리액트(React)에 부트스트랩(BootStrap) 적용하기 (7) | 2021.08.28 |
---|---|
[React] 이 시스템에서 스크립트를 실행할 수 없으므로 ~ 파일을 로드할 수 없습니다. (0) | 2021.07.22 |