dimfeld/svelte-storybook-workarounds

Still getting the error described in the article

Spenhouet opened this issue · 2 comments

I followed your article (https://imfeld.dev/writing/sveltekit_with_storybook) but was still running into the described error.
I then cloned this repo and applied this fix to install it: #2
But am still getting this error:

Uncaught ReferenceError: require is not defined
    at Object../generated-stories-entry.js (generated-stories-entry.js:3:1)
    at __webpack_require__ (bootstrap:24:1)
    at __webpack_exec__ (generated-stories-entry.js:6:1)
    at generated-stories-entry.js:6:1
    at Function.__webpack_require__.O (chunk loaded:23:1)
    at generated-stories-entry.js:6:1
    at webpackJsonpCallback (jsonp chunk loading:558:1)
    at main.iframe.bundle.js:1:109
:6006/runtime-error:1 

Failed to load resource: the server responded with a status of 404 (Not Found)

So not sure what changed and if the empty package.json workaround no longer works.

It seems this simply is not fixed yet. Here the open issue on that: storybookjs/storybook#14877

Pinning "@storybook/builder-webpack5": "6.5.0-alpha.25", seems to work for now.

Yeah it could be that some things have changed in recent versions. Thanks for the note on the pinned version! When I have some time I'll update the my blog and this repo.