create-react-app: [BUG] in version 5.0.0 react eslint plugins

Describe the bug

Once i do create my app and without changing anything the first error i get is react plugin confliction i will paste the error here ERROR in Plugin “react” was conflicted between “package.json » eslint-config-react-app » C:\Users\user\desktop\mkd\my-app\node_modules\eslint-config-react-app\base.js” and “BaseConfig » C:\Users\user\Desktop\mkd\my-app\node_modules\eslint-config-react-app\base.js”. and then if i ignore this one i get the error of that i can not do import from outside package

Did you try recovering your dependencies?

(Write your answer here.) Yes i tried few times and i think the error is in the react scripts so that why i found two main solutions

  1. removed the eslint-config-react-app
  2. down graded the react-script to 4.0.3

Which terms did you search for in User Guide?

(Write your answer here if relevant.) Almost find nothing that why i think that this is a bug

Environment

(paste the output of the command here.) $ npx create-react-app --info

Environment Info:

current version of create-react-app: 5.0.0 running from C:\Users\user\AppData\Roaming\npm\node_modules\create-react-app

System: OS: Windows 10 10.0.19043 CPU: (8) x64 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz Binaries: Node: 16.13.1 - C:\Program Files\nodejs\node.EXE Yarn: Not Found npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: Not Found Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.53) Internet Explorer: 11.0.19041.1202 npmPackages: react: Not Found react-dom: Not Found react-scripts: Not Found npmGlobalPackages: create-react-app: Not Found

Steps to reproduce

(Write your steps here:)

1.npx create react app 2. npm start 3.the error

Expected behavior

(Write what you thought would happen.) openning project without error installing outside package and run it and import it without any problem

Actual behavior

(Write what happened. Please add screenshots!) the react app should start noramlly but the app start with confliction error in plugins react although when installing another package no import can be done

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 19
  • Comments: 16

Commits related to this issue

Most upvoted comments

i think removing the eslint-config-react-app fixed the confliction issue removing the from package json and delting node modules and installing again fix the problem

Looking into the codebase, it looks like the issue, once you’ve installed eslint-config-react-app manually, is that the eslint config is being setup with webpack. So that suggests that we can just rip out the lines in package.json loading react-app. However, I’m not sure if this will effect eslint within vscode (since that should be reading the eslint config from either package.json or .eslintrc.json, without going through webpack).

A solution to this is you can stop webpack from running eslint by seeing the environment variable DISABLE_ESLINT_PLUGIN to true. Though I’m not sure what repercussions this will have.

I experienced this same issue and resolved it by removing this from my package.json:

eslintConfig: {
  "extends": "react-app"
}

I was trying to configure also in my .eslintrc.json, so I suppose it was complaining about it being configured in two places.