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

@web/storybook-prebuilt works but storybook-prebuilt doesn't #18

Open
sidharthramesh opened this issue May 5, 2021 · 1 comment
Open

Comments

@sidharthramesh
Copy link

The npm repository storybook-prebuilt throws this error:

Uncaught TypeError: f.on is not a function
    at e.default (start.js:494)
    at index.js:28
    at t (storybook-prebuilt-3ba63d3f.js:1)
    at index.js:5

I am trying to use it with the open-wc template. And I have this in my preview.js

import { setCustomElements } from 'storybook-prebuilt/web-components.js'

Surprisingly, @web/storybook-prebuilt works without any issues

import { setCustomElements } from '@web/storybook-prebuilt/web-components.js'

However, that seems to be an older repository and I am looking to use withKnobs addon which is not available there.

Thank you!

@sidharthramesh
Copy link
Author

In fact, the same error happens when doing this too:

import { withKnobs, withWebComponentsKnobs } from '@open-wc/demoing-storybook';

Error:

Uncaught TypeError: f.on is not a function
    at e.default (VM125 storybook-prebuilt-e875265e.js:1)
    at VM125 storybook-prebuilt-e875265e.js:1
    at t (VM77 storybook-prebuilt-3ba63d3f.js:1)
    at VM125 storybook-prebuilt-e875265e.js:1

I would be really grateful if you can point me towards how to actually make storybook with properly with the open-wc lit-element template. Especially these following features:

  • Automatically importing the argTypes from a custom-elements.json file
  • Actions on custom elements
  • Overriding knobs for certain properties, along with the auto-generated argTypes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant