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.

Peer dependency issue between Create-React-App and Storybook

See original GitHub issue

I previously asked a question about the warning about unmeet peer dependency here: https://github.com/facebook/create-react-app/issues/6134 I had the answer these are just warnings and nothing to worry about.

Unfortunately now I have errors: When I install "@storybook/react" and run "storybook": "start-storybook -p 9009 -s public", I get Error: Cannot find module 'babel-loader/package.json' from ...

But if I install babel-loader, and run "start": "react-scripts start", I get

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:

  "babel-loader": "8.0.4"

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

Of course, it’s fixable if I install the exact version “8.0.4”. Like explains here https://github.com/storybooks/storybook/issues/5183 But shouldn’t create-react-app re-think about the way dependencies are used ?

I don’t know a lot about how it works. But why react-script version can’t use his dependencies version and let other dependencies to use their ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
gcallaghancommented, Feb 13, 2019

I’ll run yarn upgrade on my react-scripts now and see if that fixes it.

0reactions
mrmckebcommented, Jun 23, 2019

@mkay581, I fixed this over at Storybook itself - take a look at the preset for create-react-app if you’re interested. There’s a bit happening there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conflicting peer dependency react@17.0.2 when installing ...
I found it strange that Storybook website says it's compatible with react@18.x and yet it shows peer dependency with react@17.0.2. I've tried ...
Read more >
@storybook/preset-create-react-app versions and ... - NPM Peer
Online Peer dependency version tool to search for compatible versions of related NPM packages.
Read more >
styled-components@5.3.5" has unmet peer dependency ...
Simply installing Storybook HTML with the recommended method causes a ton of dependency warnings to be emitted every time the package manager (Yarn)...
Read more >
babel-loader conflicts with create-react-app version #5183
Describe the bug After creating a new project with create-react-app yarn start and yarn test do not run. There is a conflict with...
Read more >
Creating React TypeScript component library
Creating React TypeScript component library with rollup.js from ... deals with the installation of React and explains npm peer dependencies.
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