TIL

TIL. create-react-app 오류

JJ_hyun 2022. 9. 9. 03:35
npm uninstall -g create-react-app
yarn global remove create-react-app

프로젝트를 할 때 create-react-app 을 자주 애용했다. 하지만 이번에 처음보는 오류를 보았다. 

오류내용중 가장 눈에 띄는 내용은,, 

 

 

You are running `create-react-app` 5.0.0, which is behind the latest release (5.0.1).

 

이런 글귀가 있었다. 검색을 해보니 

create-react-app 은 더 이상 전역으로 지원을 하지 않는다고 한다. 

 

해결방법이 상당히 간단하여 간략하게 정리할겸 공유하고자 한다. 

먼저 글로벌 설치를 제거해야 한다. 

npm uninstall -g create-react-app
yarn global remove create-react-app

 

이후 기존에 하던 방식으로 create-react-app 을 설치하면 오류 해결!

npm i create-react-app
npx create-react-app my-app
npx create-react-app .

왜 갑자기 이렇게 바뀌게 되었는지는 모르겠지만 오류해결 방법이 간단해서 금방 따라할 수 있을것이다.