Skip to content

compilePackages: hono app.request() resolves to undefined (reading 'status') #5143

Description

@proggeramlug

Perry: origin/main @ a674b6e (v0.5.1167) · macOS arm64
Setup: package compiled natively via perry.compilePackages (perry.allow.compilePackages: ["*"])
Build/run: perry repro.ts -o out && ./out

(Found via an internal real-package stress run — importing the real package and exercising it.)

Bug

await app.request('/json') against a Hono app yields a value whose .status read throws TypeError: Cannot read properties of undefined (reading 'status') — the Response is not produced/returned.

Repro

import { Hono } from 'hono';

const app = new Hono();
app.get('/json', (c) => c.json({ ok: true }));
const res = await app.request('/json');
console.log(res.status, await res.text());

Expected (Node)

200 {"ok":true}

Actual (Perry)

TypeError: Cannot read properties of undefined (reading 'status')

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed defect or regressionparityCompatibility gap with Node.js, ECMAScript, or the supported ecosystem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions