티스토리 뷰

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)

 

 

 

 

반응형
반응형
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31