Node.js fetch response unreadable

I’m using fetch to upload images, the images upload successfully but I can’t read the response.

  const res = await fetch('https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/images/v1', {   
  method: 'POST',
  headers: {
    Authorization: `Bearer ${TOKEN}`,
  },
  mode: 'no-cors',
  body: formData
});

  await res.json(); // throws unexpected end of JSON input
  // or
  await res.text(); // throws body is unreadable  

using the same URL with CURL does respond with JSON, so this is very perplexing!

Any ideas?

Nevermind, this turned out to be a bug in SvelteKit, CORS was being implemented for a server side route when it shouldn’t have https://github.com/sveltejs/kit/issues/7441