Closed AdrienFromToulouse closed 2 months ago
Hi, @AdrienFromToulouse. Thanks for reporting this. Sadly, I cannot look into issues without a reproduction repo. Whomever encountering this also are highly encouraged to provide one. Thank you for understanding.
I'm facing the same problem! Couldn't find a solution 😞
For us this was an issue with the recommended Jest polyfills.
We've resolved this by changing the recommended Jest polyfills to make Request
and Reponse
configurable.
PR for the docs change https://github.com/mswjs/mswjs.io/pull/416
For us this was an issue with the recommended Jest polyfills.
We've resolved this by changing the recommended Jest polyfills to make
Request
andReponse
configurable.PR for the docs change mswjs/mswjs.io#416
Many thanks for pointing that out @jcrang works like a charm now 🙏
Prerequisites
Environment check
msw
versionNode.js version
v20
Reproduction repository
https://donthavearepotoshare.com
Reproduction steps
Hi, since
2.4.4
there was this issue https://github.com/mswjs/msw/issues/2276 unfortunately the2.4.7
version has still some issues it seems. With the errorTypeError: Cannot redefine property: Request at Function.defineProperty (<anonymous>)
I think linked to: https://github.com/mswjs/msw/pull/2283Cheers,
Current behavior
TypeError: Cannot redefine property: Request at Function.defineProperty ()
Expected behavior
No error.