본문 바로가기
[ 오류 해결 ]

[React] You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.1).

by 히앤님 2022. 12. 19.
반응형
SMALL

문제 발생

실행코드

npx create-react-app ThePurE_Prj

오류 발생 및 원인

터미널에서 npx로 react App을 만들다가 생긴 오류.

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.1).
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의 글로벌(전역) 설치를 더 이상 지원하지 않습니다.
다음 명령어를 입력하여 글로벌 설치를 제거하세요
- npm uninstall -g create-react-app
- yarn global remove create-react-app

아 버전 낮다네...

 

해결 방법

전역 설치를 제거한 후 재설치한다.

npm uninstall -g create-react-app
npm i create-react-app
npx create-react-app [프로젝트 이름]

뭔 보안 취약점 이야기하는데 일단 하자.

PS C:\study\react> npm uninstall -g create-react-app
removed 67 packages in 0.818s
PS C:\study\react> npm i create-react-app
npm WARN saveError ENOENT: no such file or directory, open 'C:\study\react\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN notsup Unsupported engine for create-react-app@5.0.1: wanted: {"node":">=14"} (current: {"node":"10.24.0","npm":"6.14.11"})
npm WARN notsup Not compatible with your version of node/npm: create-react-app@5.0.1
npm WARN notsup Unsupported engine for fs-extra@10.1.0: wanted: {"node":">=12"} (current: {"node":"10.24.0","npm":"6.14.11"})
npm WARN notsup Not compatible with your version of node/npm: fs-extra@10.1.0
npm WARN enoent ENOENT: no such file or directory, open 'C:\study\react\package.json'
npm WARN react No description
npm WARN react No repository field.
npm WARN react No README data
npm WARN react No license field.

+ create-react-app@5.0.1
added 67 packages from 27 contributors and audited 67 packages in 4.303s

5 packages are looking for funding
  run `npm fund` for details

found 5 high severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

[해석]

npm WARN notsup fs-extra@10.1.0에 대해 지원되지 않는 엔진: 원함: {"node":">=12"} (현재: {"node":"10.24.0","npm":"6.14.11" })
npm WARN notsup 노드/npm 버전과 호환되지 않음: fs-extra@10.1.0
npm WARN enoent ENOENT: 해당 파일이나 디렉터리가 없습니다. 'C:\study\react\package.json'을 엽니다.
npm WARN 반응 설명 없음
npm WARN react 저장소 필드가 없습니다.
npm WARN 반응 README 데이터 없음
npm WARN react 라이센스 필드가 없습니다.

+ create-react-app@5.0.1 생성
27명의 기여자로부터 67개의 패키지를 추가하고 4.303s에서 67개의 패키지를 감사했습니다.

5개의 패키지가 자금 조달을 찾고 있습니다.
   자세한 내용은 `npm fund`를 실행하십시오.

심각도가 높은 취약점 5개 발견
   `npm audit fix`를 실행하여 문제를 수정하거나 `npm audit`를 실행하여 자세한 내용을 확인하세요.

 

반응형
LIST

댓글