Skip to content

Module not found #2

@karesztrk

Description

@karesztrk

Hey,

Thanks for this library. I wanted to test it on my project (bundled by rspack).
However, it throws the following error

ERROR in ../../node_modules/fetch-network-simulator/index.js 4:1-76
  × Module not found: Can't resolve './runtime/config' in '$PROJECT_PATH/node_modules/fetch-network-simulator'
   ╭─[4:0]
 2 │
 3 │ import { enableFetchInterception, disableFetchInterception } from "./runtime/fetchInterceptor";
 4 │ import { setSimulatorConfig, clearSimulatorConfig } from "./runtime/config";
   · ────────────────────────────────────────────────────────────────────────────
 5 │
 6 │ /**
   ╰────
  help: Did you mean './runtime/config.js'?

        The request './runtime/config' failed to resolve only because it was resolved as fully specified,
        probably because the origin is strict EcmaScript Module,
        e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.

        The extension in the request is mandatory for it to be fully specified.
        Add the extension to the request.


Rspack compiled with 2 errors in 842 ms

Do you have any clue about this? Have you correctly set your package.json up?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions