[React] yarn version 충돌 에러

Sungmin kim·2022년 10월 20일
0

react

목록 보기
2/2

react project를 세팅하는 과정에서 문제 사항을 반복하지 않고자 기록을 남깁니다.

IDE : VSCODE
Machine : Mac pro M1
node.js version : 16.18.0
package manager : yarn

우선 react를 세팅하기 이전에 intellij에서 node.js 사용한적이 있으며,
react project를 생성하기 위해 아래 명령어를 사용했습니다.

% yarn global add create-react-app

이 후 아래와 같이 에러가 발생했습니다.

The engine "node" is incompatible with this module. Expected version ">= 0.4.0 && < 0.7.0". Got "16.18.0" error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

번역 결과 호환되지 않는 모듈이라고 하면서 이해가 제대로 되지 않았습니다..

추가 리서치 후 여러가지 방법을 시도해본 결과 제가 해결한 방법입니다.

해결방법

% sudo yarn global add creat-react-app

위 명령어를 입력한 결과 강제적으로 설치했으며,

% yarn create-react-app first-react : 프로젝트 생성
% cd first-react : 폴더 변경
% yarn start : 프로젝트 실행

위 세가지 명령어를 입력하여 남은 절차를 추가로 진행했습니다.

완료!

profile
Keep Trying & Enjoing

0개의 댓글