Repository navigation
fix(one): serve route loaders on Node 26 - #1110
Merged
Merged
Conversation
Node 26.11 brand-checks Request.prototype.duplex. The lightweight request from @hono/node-server does not define duplex, so new Request(url, request) throws Illegal invocation and one serve answers the loader module with 500. Copy the request fields and set duplex only when there is a body. Validation: packages/one vitest src/server/requestAtUrl.test.ts and src/createHandleRequest.test.ts passed, 31 tests. oxlint reported no issues on the edited files. tsc --noEmit reports only the existing missing dist/esm/cli/workerPool.mjs in workerPool.test.ts. Team-Machine-Session: s171653
The checks job builds the package and fails when packages/one/types is stale. tamagui-build emitted only this new declaration. Validation: tamagui-build in packages/one left git status clean under packages/**/types except the new requestAtUrl.d.ts. Team-Machine-Session: s171653
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
one servebuilds a loader request withnew Request(finalUrl, request). On Node 26.11 and later, undici brand-checksRequest.prototype.duplex, and@hono/node-server's lightweight request does not define that field, so the constructor throwsTypeError: Illegal invocationand the loader module answers 500.duplextohalfonly when the request has a body. The same construction is used for the production serve handler and the node dev handler. The upstream fix is fix(request): forward duplex to the native request honojs/node-server#409, which is not released.one serveon Node 26.11+ answers route loader requests with 500:TypeError: Illegal invocationfromnew Request(finalUrl, request)#1109Validation
packages/onevitestsrc/server/requestAtUrl.test.tsandsrc/createHandleRequest.test.ts: 31 passed.tsc --noEmitreports only the existing missingdist/esm/cli/workerPool.mjsinworkerPool.test.ts.Team-Machine-Session: s171653