-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Excessive React library requirement for angular storybook #27213
Comments
You're right that starting from 8.0, there should be no need for a react peer dependency for non-react projects. If your issue only occurs after the upgrade, it's possible that this is a hoisting issue that may be resolved by "nuke & reinstall" all the dependencies. That said, I am afraid we will not be able to prioritize this report without a reproduction. If you are able to create one via storybook.new, we can look into it. Thank you for your understanding! |
Regardless reproduction of the problem (it was mentioned as just a case of inconveniency) these common libraries should not use react at all. Setup is: angular project, no autodocs, just component stories, we do not want to keep react dependencies there even as devDependencies. |
Are you wanting to drop React as a dependency in your dependencies or are you stating that you don't want it in the Storybook packages dependencies? With a reproduction or error output, it is difficult to determine if you are experiencing a bug that needs to be fixed or something Storybook can work on removing. Everything Storybook is doing should be isolated away, so you only have to think about your stories, but technically Storybook is a React application that renders stories as isolated mini applications inside a React component. I may not be understanding the question, but you should not need to specify it as a dependency in your project. I don't think you would be able to avoid it being a dependency in at least some of Storybook's packages, though. The Storybook UI is a React application and a story is basically a React component that renders a mini application. In your case, that mini application would be an Angular application. Ideally, Storybook hides the need to think about how it does that, but Storybook is basically just a React application that attempts to render isolated mini applications from any framework. In an Angular project, Storybook is using Compodoc to collect information for auto-documentation. If you choose to do that then the documentation would be renders with React, but that is only a small part of the UI and React is still being used for the other UI parts. |
Hi there! Thank you for opening this issue, but it has been marked as |
I'm afraid we need to close this issue for now, since we can't take any action without the requested reproduction or additional information. But please don't hesitate to open a new issue if the problem persists – we're always happy to help. Thanks so much for your understanding. |
Describe the bug
We use storybook 8 with angular 17. As I understood, react libraries are required for storybook auto-documentation, but we do not use it. Storybook builds and shows just fine, but webpack build error arises at the end of build which results in storybook process being unmanageable afterwards (can not be stopped from IDE, only process kill in task manager helps). Debugging webpack configuration gives next errors:
Can't resolve 'react' in 'node_modules@storybook\icons\dist'
Can't resolve 'react' in 'node_modules@storybook\manager-api\dist'
Can't resolve 'react' in 'node_modules@storybook\router\dist'
Is it possible to drop react dependency for these packages?
Reproduction link
I do not have reproduction link
Reproduction steps
No response
System
Additional context
No response
The text was updated successfully, but these errors were encountered: