npx cra global 삭제 이슈

gusdas·2022년 6월 16일
1

에러노트

목록 보기
13/22

CRA를 npx로 설치하고 싶었는데 자꾸 global remove를 하라는데 삭제해도 안되는 이슈가 있었다.

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

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

시도방안:

  1. 당연히 저기 친절하게 써준 명령어를 치고 npx로 설치해도 실패

  2. sudo로 삭제하라고 했는데 필자는 window라 관리자 권한으로 git bash를 실행하여 삭제해도 실패!

  3. npx의 캐쉬를 삭제해보라는 조언도 실패!

    npx clear-npx-cache

해결법:

npm ls -g create-react-app 모듈있나 확인
npx clear-npx-cache
npx create-react-app@latest --template typescript .
제일 최신 버전으로 설치

참고: https://stackoverflow.com/questions/70352503/npx-create-react-app-prompting-to-globally-uninstall-non-existent-create-react-a

profile
웹개발자가 되자

0개의 댓글