Tesseractjh
한 걸음씩
Tesseractjh
전체 방문자
오늘
어제
  • 전체 (293)
    • IT (30)
      • JavaScript (7)
      • TypeScript (5)
      • React (5)
      • Next.js (3)
      • MongoDB (2)
      • Webpack (2)
      • HTML & CSS (1)
      • Git (0)
      • AWS (1)
      • 기타 (4)
    • 연습장 (259)
      • 백준(BOJ) 문제풀이 (185)
      • 프로그래머스 문제풀이 (61)
      • LeetCode 문제풀이 (2)
      • HackerRank 문제풀이 (7)
      • 낙서장 (3)
      • 기타 (1)
    • 프로젝트 (3)
      • 지뢰피하기 (1)
      • 키릴-라틴 문자 변환기 (1)
      • Flex & Grid (1)
    • 멋쟁이사자처럼 프론트엔드 스쿨 1기 (1)
      • 일기 & 회고록 (1)

인기 글

티스토리

hELLO · Designed By 정상우.
Tesseractjh

한 걸음씩

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

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

2022. 1. 7. 09:38

https://github.com/facebook/react/blob/main/LICENSE

 

$ npx create-react-app 프로젝트이름

create-react-app을 npx를 통해 설치할 때 아래와 같은 오류가 뜨는 경우가 있다.

 

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

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

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/

 

이전에 create-react-app 4.x 버전을 global로 설치한 적이 있으면 이런 오류가 뜨는 것 같다.

위 메시지에 나온 대로 npm과 yarn에서 모두 create-react-app을 삭제해주면 된다.

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

 

그런데 이렇게 했는데도 또 같은 오류가 뜨는 경우가 있다.

검색해보니 npm에서 create-react-app을 설치하고 그 다음에 npx create-react-app을 치는 방법이 있었다.

$ npm uninstall -g create-react-app
$ npm install create-react-app
$ npx create-react-app 프로젝트이름

 

그러나 나의 경우에는 yarn global remove가 실패하면서 삭제를 못한 경우였다.

yarn global remove create-react-app을 치면 아래와 같은 에러가 떴다.

[1/2] Removing module create-react-app...
error This module isn't specified in a package.json file.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

 

yarn을 삭제하고 다시 깔고, yarn global list로 확인을 해봐도 아무것도 없는데 계속 실패했었다.

그러다가 yarn global add 로 다시 깔고 다시 삭제를 시도하니 제대로 삭제가 되었다.

그리고 나서 다시 npx create-react-app을 하니 해결되었다!

$ yarn global add create-react-app
$ yarn global remove create-react-app
$ npx create-react-app 프로젝트이름

 

참고자료

https://velog.io/@milkyway/React-%EC%98%A4%EB%A5%98-%ED%95%B4%EA%B2%B0-You-are-running-create-react-app-4.0.2-which-is-behind-the-latest-release-4.0.3

 

React 오류 해결 You are running `create-react-app` 4.0.2, which is behind the latest release (4.0.3).

npx create-react-app 실행 오류 해결법

velog.io

 

저작자표시 비영리 (새창열림)

'IT > React' 카테고리의 다른 글

[Recoil] Duplicate atom key 에러 메시지 없애기 (Next.js, Vite)  (0) 2023.01.22
[Vite/React] Vite HMR 에러 (feat. ContextAPI)  (0) 2023.01.15
[React Testing Library] SVG 파일을 인식하지 못하여 SyntaxError가 발생할 때  (0) 2022.06.28
[styled-components] 폰트 깜빡임(FOUT) 해결하기  (1) 2022.04.19
    'IT/React' 카테고리의 다른 글
    • [Recoil] Duplicate atom key 에러 메시지 없애기 (Next.js, Vite)
    • [Vite/React] Vite HMR 에러 (feat. ContextAPI)
    • [React Testing Library] SVG 파일을 인식하지 못하여 SyntaxError가 발생할 때
    • [styled-components] 폰트 깜빡임(FOUT) 해결하기
    Tesseractjh
    Tesseractjh
    바닐라 자바스크립트를 좋아하는 개발자입니다

    티스토리툴바