-
-
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
Should @storybook/react depend on ajv
/ajv-keywords
?
#2979
Comments
This part looks really weird, given that
Iooks like an npm bug to me |
@Hypnosphi it's unmet because eslint requires |
@Hypnosphi I think it's mostly that the error messages are pretty... unclear. But it seems to be that the lack of an |
Specifically, if any of the direct deps here specifies a peer dependency that storybook/react does not explicitly declare as a dep, then that peer dep is an implicit, but required part of storybook/react’s API. What happens if you cd into that package, npm install, and then run |
@backwardok why does it write @ljharb But actually, as far as I see, all the packages in the tree that depend on |
Probably relevant: npm/npm#19483 |
@Hypnosphi because it installed |
@backwardok in fact it did (at least for me with |
|
Yeah it's weird because i seem to have both in my tree.
|
My basic example has many copies of ajv:
|
The bug is an npm bug! Woooo! Closing this. :/ |
Issue details
Hi all,
I've been running through a pretty interesting dependency issue that I'm trying to figure out how best to mitigate. For context I am on:
npm@5.6.0
node@8.9.1
I have storybook as a dev dependency of my package as well as a whole lot of other things. Notably, storybook brings in webpack@^3.11.0 and postcss-loader@^2.1.0=>schema-utils@^0.4.4 ... both of which bring in ajv@6/ajv-keywords@3 as of a few days ago.
These changes down the tree made my app's
npm ls
(and therefore my tests) all start erroring out with no code changes.I have a basic repro case here: https://github.com/majapw/ajv-deps-test
Basically if you install
eslint
at the latest (which pulls in ajv@5) and@storybook/react
at the latest (which pulls in ajv@6) you get an error when you runnpm ls
due to peer dep incompatibility. I think that if storybook depended directly on ajv@6, this would mitigated. I could be wrong though and am open to other possibilities. Thoughts?@backwardok @ljharb @gabergg
Steps to reproduce
Please specify which version of Storybook and optionally any affected addons that you're running
@storybook/react@3.3.13
Affected platforms
react
The text was updated successfully, but these errors were encountered: