Tech/React

[React]You are running create-react-app 4.0.3, which is behind the latest release (5.0.0) 오류

lonnie(동현) 2022. 1. 13. 10:55

npx create-react-app taskbox 명령을 사용했는데, 아래와 같은 오류가 발생하여서 이를 해결해보고자 한다. 간단하게 이제 글로벌 설치가 지원되지 않는다는 것이다.

You are running create-react-app 4.0.3, which is behind the latest release (5.0.0) We no longer support global installation of Create React App.

 

해당 오류를 해결하기 위한 방법으로 아래와 같은 방법이 터미널에 제시되고 있다.

Please remove any global installs with one of the following commands:
npm uninstall -g create-react-app
yarn global remove create-react-app[Getting Started | Create React App

 

 이를 해결하고자 공식 페이지(Create React App)를 참고해보았다.

공식 홈페이지에 따르면 아래와 같이 기술되어있다.

If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app or yarn global remove create-react-app to ensure that npx always uses the latest version.

 간단하게 말해서 이전에 npm 또는 yarn 을 통해 글로벌로 설치한 적이 있으면 지우고, npx 를 통해 설치를 진행하라는 것이다. 일단 why 에 대해서는 찾았으니 이대로 진행해보도록 하겠다. npm, yarn 순서대로 진행하였다.

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

yarn이 성공적으로 remove가 진행되었다. 이제 이 상태로 다시 npx create-react-app taskbox 를 진행해보았더니 오류 없이 성공적으로 설치가 진행되는 것을 볼 수 있었다.

728x90
반응형