3

npm start

pushercoins@0.1.0 start react-scripts start

There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

"eslint": "^7.11.0"

Don't try to install it manually: your package manager does it automatically. However, a different version of eslint was detected higher up in the tree:

/Users/sujit_jaiwaliya/node_modules/eslint (version: 6.8.0)

  • Does this answer your question? [NPM start returns error, "There might be a problem with the project dependency tree"](https://stackoverflow.com/questions/56528222/npm-start-returns-error-there-might-be-a-problem-with-the-project-dependency-t) – Henke Mar 18 '22 at 14:53

3 Answers3

9

SOLUTION: This worked for me I hope it does the same to you guys:

  1. I Unistall eslint version 6.8.0 :

    npm uninstall eslint@6.8.0

  2. Then I install eslint@7.11.0:

    npm i eslint@7.11.0

  3. Then i run fix audit:

    npm audit fix --force

  4. Then i changed the DIR file by adding a .env file with this code in it :

    ESLINT_NO_DEV_ERRORS=true

This issue has been fixed in the react-scipts:"4.0.3" but, the eslint errors present in the project are not converted to warnings by default. You have to create an .env file that should contain a ESLINT_NO_DEV_ERRORS=true flag. Due to this flag, you will receive the eslint errors as warnings and not as errors in the development.

This flag is ignored during production and when they are any git hooks running, which will, in turn, cause an error when you are trying to commit the code with an eslint error in it.

MELLAL Fethi
  • 137
  • 1
  • 5
1

This is because you already have some other version of eslint installed. To resolve this, first remove that version (in this case 6.8.0) and then again run

npm start

Uninstall the other version using npm uninstall eslint

Damodar Hegde
  • 386
  • 1
  • 8
0

I started the project with the right versions of everything but somewhere my code broke and started requesting a different version of eslint. "react-scripts" was the only package that had eslint as a dependency.

I tried npm uninstall eslint but it didn't quite work. So I removed react-scripts and then reinstalled it as below

  1. npm uninstall react-scripts
  2. npm install react-scripts.

You might want to install the specific version that was installed before. If your current version is 4.0.3 then when installing just add it at the end like this npm install react-scripts@4.0.3 on step 2 above.

It totally removed the error for me, hope it does for you too.

Wylie
  • 350
  • 3
  • 12