Skip to content
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

fix: Add missing peer dependencies to addon-knobs #4928

Merged

Conversation

eps1lon
Copy link
Contributor

@eps1lon eps1lon commented Dec 5, 2018

Fixes Uncaught TypeError: Object(...) is not a function when using @storybook/addon-knobs and @emotion/core@^10.x

Issue:

The combination of the above packages created the following dependency tree:

├─ @emotion/[email protected]
├─ @storybook/[email protected]
│  └─ @emotion/[email protected]

However @emotion/styled has a peer dependency to @emotion/[email protected]. I didn't find any method in npm or yarn to add @emotion/[email protected] while still being able to use @emotion/[email protected]. This is probably the reason missing peer dependencies should be added immediately instead of relying on consuming packages to do this.

What I did

How to test

  • Is this testable with Jest or Chromatic screenshots?
    No
  • Does this need a new example in the kitchen sink apps?
    No
  • Does this need an update to the documentation?
    No

If your answer is yes to any of these, please make sure to include it in your PR.

Copy link
Member

@wuweiweiwu wuweiweiwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@codecov
Copy link

codecov bot commented Dec 11, 2018

Codecov Report

Merging #4928 into next will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             next    #4928   +/-   ##
=======================================
  Coverage   35.02%   35.02%           
=======================================
  Files         566      566           
  Lines        7004     7004           
  Branches      937      937           
=======================================
  Hits         2453     2453           
  Misses       4055     4055           
  Partials      496      496

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a06253...78dc61f. Read the comment docs.

@Hypnosphi Hypnosphi requested a review from ndelangen December 11, 2018 17:30
@ndelangen ndelangen merged commit e9b9e07 into storybookjs:next Dec 12, 2018
@eps1lon eps1lon deleted the fix/addon-knobs/missing-peer-deps branch December 13, 2018 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants