Upgrade to Node.js 24: TypeError: RequestInit: Expected signal ("AbortSignal {}") to be an instance of AbortSignal. #2530
-
|
Because I'm unsure how to categorize the issue that I'm running into, I'm going to open a discussion rather than a bug report (as this might not be a problem with msw necessarily). In a project that I'm upgrading from Node.js v23.11.1 to v24.1.0, I'm starting to see all tests that involve msw-mocked network requests fail with the following underlying exception upon creating a The appearance of the Removing any code in my project that sets the What steps can I do to investigate/categorize this issue further so that I can report a bug in the right place? The Node.js v24 release notes don't immediately strike me as containing a relevant breaking change (though the list of major changes under https://nodejs.org/en/blog/release/v24.0.0#semver-major-commits doesn't exactly make clear what was broken), but prior to me upgrading Node.js, the tests work fine. Notes
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
|
To the maintainers of this repo: Is an update to undici v7 planned? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for reporting this. Looks like a classic mismatch of dependency versions to me. I'm trying to see what we do in Interceptors to have caused that... As of now, MSW doesn't offer official support for Node.js v24 so it's hard for me to categorize this as an issue. I hope we can ditch I wonder why exactly this issues happens. Our proxy wraps the global class A {}
let a = new A()
let b = new Proxy(a, {})
b instanceof A // true@kleinfreund, I could use your help getting to the bottom of this, if you have the time. If we can track down what causes this, we can address it and publish a fix. It's also worth raising this in the Undici's repo as the folks there have more context around Node.js releases and version compatibility. Thanks. |
Beta Was this translation helpful? Give feedback.
-
|
There's a good chance the next major version of vitest, version 4, addresses this by fixing vitest-dev/vitest#8374 with vitest-dev/vitest#8390. Installing In other words: this wasn't an issue with msw. |
Beta Was this translation helpful? Give feedback.
There's a good chance the next major version of vitest, version 4, addresses this by fixing vitest-dev/vitest#8374 with vitest-dev/vitest#8390.
Installing
[email protected], I do get some errors, but I get the same errors without upgrading to Node.js 24 meaning that the issue outlined here is no longer there.In other words: this wasn't an issue with msw.