payloadcms / payloadcms/payload

Replace undici with built-in fetch

Open
#14,543 1 comment 0 reactions 1 assignee View on GitHub

@AlessioGr is already working on this.

Since Nov 10, 2025.

Dominant language
TypeScript
Stars
44.8k
Forks
4.2k
Avg merge
2d 21h
Merged PRs (30d)
53

Description

Describe the Bug

I don't think that undici needs to be depended on. I believe that fetch should work:
https://nodejs.org/api/globals.html#custom-dispatcher

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/blob/d3b934c763ff804e98688c31328a774830105267/packages/payload/src/uploads/safeFetch.ts#L5

Reproduction Steps

https://github.com/payloadcms/payload/blob/d3b934c763ff804e98688c31328a774830105267/packages/payload/package.json#L116

Which area(s) are affected? (Select all that apply)

area: core

Environment Info
`main`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.