728x90
※ React 프로젝트를 만들려고 vscode 터미널에서 create-react-app my-app 명령어를 입력했더니 아래의 오류가 떴다.
Create React App의 글로벌(전역) 설치를 더 이상 지원하지 않습니다. 다음 명령어를 입력하여 글로벌 설치를 제거하세요.
☞ npm uninstall -g create-react-app
☞ yarn global remove create-react-app
오류 원인
Create React App의 글로벌(전역) 설치를 더 이상 지원하지 않습니다.라는 메시지가 나타났다면, 이는 create-react-app이 전역으로 설치되어 있기 때문에 발생하는 오류이다.
이럴 땐 아래의 명령어로 전역 설치를 제거해 주면 된다.
npm uninstall -g create-react-app
해결 방법
전역 설치가 제거 후, npx create-react-app my-app 명령어를 다시 입력하면 된다.
이 명령어는 최신 버전의 create-react-app을 다운로드하여 my-app이라는 이름의 새로운 React 프로젝트를 생성한다.
npx create-react-app my-app
728x90
'error 해결' 카테고리의 다른 글
[DBeaver error] dbeaver Error connecting to datasource (0) | 2022.07.27 |
---|---|
[error] sh: react-scripts: command not found' (0) | 2022.07.14 |
[error] Could not find a required file. Name: index.html (0) | 2022.07.13 |
[error] TypeError: Cannot set properties of null (setting 'innerText') (0) | 2022.04.30 |
[error] ReferenceError: document is not defined (0) | 2022.04.19 |