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.

@storybook/builder-webpack5 doesn't allow React 18

See original GitHub issue

I 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:open
  • Created a year ago
  • Reactions:7
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
reneaaroncommented, Apr 14, 2022

I just had the same issue. While installation didn’t work with npm install it did work with yarn install 🤷‍♂️

2reactions
shilmancommented, Apr 29, 2022

Try upgrading to the latest prerelease:

npx sb@next upgrade --prerelease
Read more comments on GitHub >

github_iconTop 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 >

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