-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Storybook React dependency issue with NPM 7 #15725
Labels
Comments
Varedis
changed the title
Storybook dependency
Storybook React dependency issue with NPM 7
Jul 30, 2021
Closing this as duplicate to #14119. Please let me know if you think it's a separate issue! 🙏 |
Hi @shilman Whilst related, I believe the issue is separate for the following reasons:
|
@Varedis thanks for the clarification, reopening! |
This is fixed in storybook 7.0 beta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Incorrect module resolution when React is installed as a dependency.
When installing storybook if
react
andreact-dom
are dependencies it causes issues with modules likeaddon-docs
not being installed correctly fromaddon-essentials
.For whatever reason they get nested inside
addon-essentails
and not installed at the top level.Removing the
node_modules
and deleting thepackage-lock.json
and installing again produces the same issue.Once you delete
react
andreact-dom
from the dependencies and reinstall the packages,addon-docs
gets correctly installed.You can also use
--legacy-peer-deps
which causes correct resolutions of all packages.Seemingly having react as a dependency and a peer dependency somehow causes unintended issues with other packages even though the versions meet all peer dependency requirements
I have created a simple repo below that replicates the issue
To Reproduce
Reproduction repo can be found here: https://github.com/Varedis/storybook-peer-issue
System
Additional Info
No errors or peer warnings on either install, just a broken package tree.
The text was updated successfully, but these errors were encountered: