꾸준히 성장하는 개발자

[에러] Plugin "react" was conflicted between "package.json » eslint-config-react-app 본문

React

[에러] Plugin "react" was conflicted between "package.json » eslint-config-react-app

ahleum 2022. 4. 29. 16:16

 

 

 

 

react 프로젝트를 만들고 있는데 또 이런 에러가 뜬다. 

구글링을 시작한다.

 

 

시도한 해결방법

 

방법 1. package.json 파일에서 [ctrl+s]  를 눌러 저장한다.

 -> 이러면 그때만 문제가 해결되고 새로고침을 할때마다 다시 에러가 뜬다. xxxxx

 

 

방법 2  .package.json 파일에서 이 부분을 삭제해준다.

 "eslintConfig": {
   "extends": [
     "react-app",
     "react-app/jest"
    ]
  },

엥 이것도 안된다....

 

 

 

방법 3.  eslint-config-react-app 을 지우고 버전 6을 깔아줘 보자

npm remove eslint-config-react-app

npm i eslint-config-react-app@6

지우는 것까지는 성공 그런데 설치에서 계속 에러가 뜬다....

 

 

 

 

방법 4  .  위 2번 문구를 그대로 지우고, 3번에서 eslint-config-react-app 까지 지운 상태

             node modules 폴더, package-lock.json 파일을 지운 뒤

npm i

해서 다시 깔아준다

 

   ------>>   해결!!!!!!!!!!!!!

 

 


 

이게 powershell과 window에서의 문제라는 글이 적혀있었다

아래 그림처럼 난 바탕화면에서 desktop의

첫 글자가 대문자, 소문자의 차이로 인한 게 powershell에서 충돌이 일어난다는 글

그럼 VScode에서 터미널을 열어 설치를 해서 그런 걸 수도 있으니

cmd(명령 프롬프트)를 열어 다시 설치를 해보았다

 

cmd에서 react project를 깔아주고 vscode로 열어주고 서버를 열어주니 아주 멀쩡하다. 

그리고 VScode 터미널(powershell)에서 깔면서 만났던 아래 에러도 나타나지 않는다

https://dkfma6033.tistory.com/130

 

[에러] Need to install the following packages: create-react-app

Need to install the following packages:   create-react-app Ok to proceed? (y)  이런식으로 뜨면서 깔리다가 파일이 지워지면서 끝난다... 검색을 해보니 방법 1 npx clear-npx-cache //npx.에서 캐..

dkfma6033.tistory.com

 

 

그럼 VScode의 powershell이 아닌 Bash에서 설치해보면 어떨까..?

 바로 진행해본다.

이번에도 괜찮다. 

 

앞으로는 그냥 cmd 열어서 설치해야겠다

'React' 카테고리의 다른 글

React - jsx , state, props  (0) 2022.05.06
[React] React.memo()  (0) 2022.05.04
[에러] Need to install the following packages: create-react-app  (0) 2022.04.29
[React]useState( )  (0) 2022.04.27
[React]styled-component 를 이용한 theme  (0) 2022.03.01