Peer dependency issue between Create-React-App and Storybook
See original GitHub issueI 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:
- Created 5 years ago
- Reactions:3
- Comments:12 (4 by maintainers)
Top GitHub Comments
I’ll run yarn upgrade on my react-scripts now and see if that fixes it.
@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.