question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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: "webpack": "4.19.1"

See original GitHub issue

Hi guys! I can’t start my react app, I always get this error message even if I tried the steps:

C:\Users\loicq\Desktop\Coding\react\diablo-mvp>npm start

uvergo-mvp@0.1.0 start C:\Users\loicq\Desktop\Coding\react\diablo-mvp 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:

“webpack”: “4.19.1”

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

C:\Users\loicq\node_modules\webpack (version: 4.27.0)

Manually installing incompatible versions is known to cause hard-to-debug issues.

If prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will permanently disable this message but you might encounter other issues.

To fix the dependency tree, try following the steps below in the exact order:

  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
  2. Delete node_modules in your project folder.
  3. Remove “webpack” from dependencies and/or devDependencies in the package.json file in your project folder.
  4. Run npm install or yarn, depending on the package manager you use.

In most cases, this should be enough to fix the problem. If this has not helped, there are a few other things you can try:

  1. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead. This may help because npm has known issues with package hoisting which may get resolved in future versions.

  2. Check if C:\Users\loicq\node_modules\webpack is outside your project directory. For example, you might have accidentally installed something in your home folder.

  3. Try running npm ls webpack in your project folder. This will tell you which other package (apart from the expected react-scripts) installed webpack.

If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That would permanently disable this preflight check in case you want to proceed anyway.

P.S. We know this message is long but please read the steps above 😃 We hope you find them helpful!

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! diablo-mvp@0.1.0 start: react-scripts start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the uvergo-mvp@0.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\loicq\AppData\Roaming\npm-cache_logs\2018-12-06T03_16_34_961Z-debug.log

C:\Users\loicq\Desktop\Coding\react\diablo-mvp>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
yuujiroucommented, Dec 25, 2018

go to your package.json replace “react-scripts”: “whatever ver u got” to “react-scripts”: “1.1.4”, then run npm install, after that npm start

3reactions
Timercommented, Dec 6, 2018

Hmm, did you really try the steps?

The message states this is because of a dependency in your home directory – is this installation of webpack intentional?

C:\Users\loicq\node_modules\webpack

If no, please delete this folder: C:\Users\loicq\node_modules

Read more comments on GitHub >

github_iconTop Results From Across the Web

'npm start' returns error: "There might be a problem with the ...
There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you...
Read more >
React js npm start error - JavaScript - The freeCodeCamp Forum
There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you...
Read more >
the react-scripts package provided by create react app ...
There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you...
Read more >
HOW DO I FIX THIS ERROR : r/reactjs - Reddit
There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you...
Read more >
webpack": "4.19.1" dependency error - Google Groups
It is likely not a bug in Create React App, but something you need to fix locally. Teh react-scripts package provided by Create...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found