Open thearnica opened 1 year ago
I'm experiencing a similar problem in React Router ≥v6.4.5. They changed their code to check the response for a body
property that's not undefined
. Previously, they only checked if the response was an instance of Response
which passed, but pretender is returning a response with no body
at all, and it's short-circuiting the navigation.
Just want to report an issue I found during Next13 adoption - it short navigation between pages is not working.
The problem appears as
TypeError: Cannot read properties of undefined (reading 'getReader')
atreact-server-dom-webpack-client.development.js
Root cause is at
startReadingFromStream(response, r.body);
withr
beingResponse
defined by pretender and.body
being not defined.In short - the underlaying polyfill does not support
.body
and likely will never support it - https://github.com/github/fetch/issues/1109This basically means that the problem cannot be resolved in the downstream and might need correction at the pretender level. Why do you need FakeFetch in any case?