Skip to content

Version 8.0.3 breaks the webidl cache #5024

Closed

Description

@jsumners-nr

I know that Node v20 isn't technically supported, but the following script works on 8.0.2 under Node 20.20.2, but it does not work with 8.0.3:

'use strict'

const undici = require('undici')

main()
  .then(() => {})
  .catch(console.error)

async function main() {
  const { statusCode } = await undici.request(
    'http://httpbin.org/',
    {
      path: '/anything',
      method: 'POST',
      headers: { 'content-type': 'application/json' },
      body: Buffer.from('{"hello":"world"}')
    }
  )
  console.log('status code: ', statusCode)
}
❯ node index.js
/private/tmp/13/repro/node_modules/undici/lib/web/cache/cachestorage.js:20
    webidl.util.markAsUncloneable(this)
                ^

TypeError: webidl.util.markAsUncloneable is not a function
    at new CacheStorage (/private/tmp/13/repro/node_modules/undici/lib/web/cache/cachestorage.js:20:17)
    at Object.<anonymous> (/private/tmp/13/repro/node_modules/undici/index.js:179:25)
    at Module._compile (node:internal/modules/cjs/loader:1521:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1623:10)
    at Module.load (node:internal/modules/cjs/loader:1266:32)
    at Module._load (node:internal/modules/cjs/loader:1091:12)
    at Module.require (node:internal/modules/cjs/loader:1289:19)
    at require (node:internal/modules/helpers:182:18)
    at Object.<anonymous> (/private/tmp/13/repro/index.js:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1521:14)

Node.js v20.20.2

Activity

  1. mcollina commented on Apr 13, 2026

    @mcollina
    SponsorMember

    As you said, it's not supported ;).

    Does anything bad happen on v22?

  2. jsumners-nr commented on Apr 13, 2026

    @jsumners-nr
    Author

    No. But the fact it works on 8.0.2 and not on 8.0.3 seems like something to investigate regardless of runtime version.

  3. KhafraDev commented on Apr 14, 2026

    @KhafraDev
    Member

    undici v8 dropped support for node v20 in 393094a

    "node": ">=22.19.0"

    It doesn't seem actionable to me. Feel free to reopen if you feel otherwise.

  4. jblazquez-cdi commented on Apr 15, 2026

    @jblazquez-cdi

    It would be nice to signal change of minimum node versions as a breaking change in the release text. I read the release text, I saw no breaking change (at least not one that it should care about), and updated, just to have this same error. Fortunately 7.25 works enough for me.

  5. timtucker-dte commented on Apr 16, 2026

    @timtucker-dte

    It would be nice to signal change of minimum node versions as a breaking change in the release text. I read the release text, I saw no breaking change (at least not one that it should care about), and updated, just to have this same error. Fortunately 7.25 works enough for me.

    If you want to see clearer errors when there's a breaking change, add:
    engine-strict=true

    To your .npmrc file

  6. added a commit that references this issue on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions