React
[React] React npx 설치 오류
fnow
2021. 12. 15. 13:08
반응형
npx create-react-app으로 리액트 설치 시 아래와 같은 오류가 발생했을 때의 해결 방법이다.

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. 우선 전역 설치된 리액트 앱을 삭제해준다.
npm uninstall -g create-react-app
2. npm으로 리액트를 다시 설치해준다.
npm add create-react-app
3. 해당 작업 폴더에서 npx로 다시 설치한다.
npx create-react-app (app name)
반응형