[eslint] Plugin "react" was conflicted between "package.json » eslint-config-react-app » C:\Users\사용자이름\desktop\프로젝트폴더이름\node_modules\eslint-config-react-app\base.js" and "BaseConfig » C:\Users\사용자이름\Desktop\프로젝트폴더이름\node_modules\react-scripts\node_modules\eslint-config-react-app\base.js".
이 에러때문에 거의 두시간을 고생했는데 구글링으로 해결방법을 알아냈다..
Solution 1: Check the DIRECTORY name
Make sure the directory name is not capitalized. For example, the directory name "Reactapp/REACTAPP/React-app" will throw this error, but "reactapp/react-app" will not. Sometimes casing may cause issues.
Solution 2: downgrade to version 6.
If you're using yarn, you can **downgrade **to version 6.8.0 of the eslint-config-react-app package by running the following command:
yarn add --dev eslint-config-react-app@6.
Solution 3: Save the package.json file
If you're using a package manager other than yarn, you can try saving your project's package.json file (ctrl + s) and running the command again.
Solution 4: Uninstall eslint-config-react-app and reinstall it.
If the above solutions don't work, you can try uninstalling eslint-config-react-app and reinstalling it:
yarn remove eslint-config-react-app
yarn add --dev eslint-config-react-app
내가 해결한 방법은 Solution 4!!
Solution 5: Remove the conflict from your project's dependencies.
If you're still seeing the error, it's likely that there is a conflict in your project's dependencies. You can try removing the conflicting dependency from your package.json file and running the command again.
If you're still seeing this error after trying these steps, please file a bug report at https://github.com/eslint/eslint/issues. Include your project's dependencies and versions, as well as your ESLint configuration.
Originally this post is added on my hashnode profile first and here is the link https://atifriaz.hashnode.dev/how-to-fix-error-in-plugin-react-was-conflicted-between-packagejson-and-eslint-config-react-app
'개발 > Today I Learned' 카테고리의 다른 글
멋사 D+2 환경 설정 + Git + CLI (0) | 2022.11.29 |
---|---|
멋사 D+1 HTML/CSS (0) | 2022.11.28 |
[ React Error ] Failed to load config "react-app" to extend from. (0) | 2022.10.21 |
[TIL] React Hooks :: useState의 기본형과 함수형 (0) | 2022.09.06 |
[TIL] React와 불변성 (0) | 2022.09.05 |