Skip to content

still seeing ModuleNotFoundError #58

@CollinMonahanLab49

Description

@CollinMonahanLab49

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions