open-wc / storybook-prebuilt

MIT License
10 stars 6 forks source link

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

Open sidharthramesh opened 3 years ago

sidharthramesh commented 3 years ago

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 commented 3 years ago

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: