This has compatibility issues in Node v18's fetch implementation for handling of 204 no-content results.
Nodes fetch (backed by undici) expects a 204 response to have a nullable body, however axios-fetch returns an empty buffer, resulting in the following error
In Node.js 18, an experimental global fetch API is available by default (https://nodejs.dev/en/blog/announcements/v18-release-announce#fetch-experimental).
axios-fetch
currently assumesnode-fetch
as the underlying fetch mechanism.This has compatibility issues in Node v18's fetch implementation for handling of 204 no-content results.
Nodes fetch (backed by
undici
) expects a 204 response to have a nullable body, howeveraxios-fetch
returns an empty buffer, resulting in the following errorThe expectation is that
axios-fetch
also returns a nullable body for 204 no-content responses.The current workaround to this is to avoid utilising nodes
fetch
impl via--no-experimental-fetch
or override our global references withnode-fetch