@storybook/builder-webpack5 doesn't allow React 18
See original GitHub issueI can’t install @storybook/builder-webpack5
with npm because of a dependency error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my-app@1.0.0
npm ERR! Found: react@18.0.0
npm ERR! node_modules/react
npm ERR! react@"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from @storybook/builder-webpack5@6.4.22
npm ERR! node_modules/@storybook/builder-webpack5
npm ERR! dev @storybook/builder-webpack5@"^6.4.21" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
It works with yarn install though.
Could you allow React 18?
EDIT: I see that react 18 is already allowed as a peer dependency in https://github.com/storybookjs/storybook/blob/next/lib/builder-webpack5/package.json . It’s really weird.
Issue Analytics
- State:
- Created a year ago
- Reactions:7
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Webpack
Default configuration. By default, Storybook's Webpack configuration will allow you to: Import images and other static files. You can import images ...
Read more >how to implement fonts with Storybook 6.5 + webpack 5 ...
i am trying to add custom fonts. the tech stacks: webpack 5; storybook 6.5; react.js 18; typescript; docker; year 2022; yarn; mac m1....
Read more >storybook/builder-vite
Migration from webpack / CRA. Install vite and @storybook/builder-vite; Remove any explicit project dependencies on webpack , react- ...
Read more >@storybook/builder-webpack5 | Yarn - Package Manager
Builder -Webpack5. Builder implemented with webpack5 and webpack5 -compatible loaders/plugins/config, used by @storybook/core-server to build the preview ...
Read more >Strict Mode
Like Fragment , StrictMode does not render any visible UI. ... abstraction levels by allowing a parent to demand that certain children were...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just had the same issue. While installation didn’t work with
npm install
it did work withyarn install
🤷♂️Try upgrading to the latest prerelease: