-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I saw recent issue Webpack 5 Throws ModuleNotFoundError and related PR fix: add webpack5 support
I was led to this issue because following install and setup of msw-storybook-addon I see a similar error on storybook startup, ModuleNotFoundError: Module not found: Error: Can't resolve 'http' with the same long sequence of
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "http": false }
However I have msw-storybook-addon version 1.4.1, according to the PR that should be released. Perhaps the issue here is subtly different?
% grep msw-storybook-addon package.json
"msw-storybook-addon": "^1.4.1",
and from yarn.lock,
msw-storybook-addon@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/msw-storybook-addon/-/msw-storybook-addon-1.4.1.tgz#7a12cf0116a7af7f1ce1b652838ded161296e963"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working