You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using this library to fetch metadata on https://nextjs.org/docs/app/building-your-application/routing/router-handlers, which normally is redirected to https://nextjs.org/docs/app/building-your-application/routing/route-handlers, an error occurs and process fails. This doesn't happen with v0.1.3 or below.
Environment
Linux / Node.js v21.4.0 / fetch-site-metadata v0.2.0
Maybe the migration from node-fetch package to native fetch causes the bug, which means it should be a bug of undici, a HTTP library used behind Node.js's native fetch.
Now I confirmed that Node.js v18 still crashes with the reproduction, whereas v20, v22, v23 don't crash. It suggest that an upstream bug caused this issue is fixed in undici v6.
Bug
When using this library to fetch metadata on
https://nextjs.org/docs/app/building-your-application/routing/router-handlers
, which normally is redirected tohttps://nextjs.org/docs/app/building-your-application/routing/route-handlers
, an error occurs and process fails. This doesn't happen with v0.1.3 or below.Environment
Linux / Node.js v21.4.0 /
fetch-site-metadata
v0.2.0Minimal reproduction code:
Output
node:internal/webstreams/readablestream:1078 throw new ERR_INVALID_STATE.TypeError('Controller is already closed'); ^ TypeError [ERR_INVALID_STATE]: Invalid state: Controller is already closed at ReadableStreamDefaultController.enqueue (node:internal/webstreams/readablestream:1078:13) at fetchParams.controller.resume (node:internal/deps/undici/undici:10994:45) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 'ERR_INVALID_STATE' } Node.js v21.4.0
The text was updated successfully, but these errors were encountered: