-
-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot assign to read only property 'Request' of object '[object Window]' #2276
Comments
It looks like 2.4.4 really has something weird, it's like the third issue breaking people tests. Maybe you'd want to deprecate it on npm until a new version can be released? David |
I've gotten this error too after running an |
We have a similar issue:
|
Temporarily solved the problem by rolling back to an older version of the library ("msw": "^2.4.3") |
I have the exact same issue after upgrading to the lastest version of msw. |
confirmed, since |
I narrowed it down to this commit : mswjs/interceptors@4660558#diff-9be9bd59c25c2573eca1764259102bcd08087e15b997c3cede7e51ceaaa5df9fR106 Overriding the dependency fixes the bug : "@mswjs/interceptors": "0.32.1" |
This has a similar root cause and the fix as #2281 (comment). |
There is no concept of deprecating or unpublishing a package on NPM. Software has bugs, and we've done a ton of changes and improvements in that Interceptors update. Honestly, it's a surprisingly little number of bugs, and most of them are related. You should pin MSW to a specific version that worked for you until the issues are resolved. That's how to handle it in open source. |
That’s actually incorrect, see https://docs.npmjs.com/deprecating-and-undeprecating-packages-or-package-versions That said, I agree that it’s not really necessary in this particular case, especially since there seems to be a fix now. |
Released: v2.4.7 🎉This has been released in v2.4.7! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
Prerequisites
Environment check
msw
versionNode.js version
v20.16.0
Reproduction repository
https://github.com/hays0503/sck1
Reproduction steps
Run test "test:coverage": "jest --coverage"
And get error
FAIL src/entities/ComponentSelectCity/ui/test/ComponentSelectCity.test.tsx
× Фильтрация городов при поиске
● Фильтрация городов при поиске
Current behavior
I noticed that the error started appearing with version 2.4.4. I rolled back to older versions and the problem was solved.
Expected behavior
Fixing the problem
The text was updated successfully, but these errors were encountered: