Env: perry 0.5.1512 built from main@6173ff9f6, macOS arm64. MB24 Phase-0 spike.
Symptom: with @hono/node-server@1.19.17 + hono@4.13.4 in perry.compilePackages, serve({ fetch: app.fetch, port }) crashes:
Cannot read properties of undefined (reading 'listen')
@hono/node-server dist/index.mjs:
import { createServer as createServerHTTP } from "http"; // line 2
…
const createServer = options.createServer || createServerHTTP; // 645
const server = createServer(options.serverOptions || {}, requestListener); // → undefined(...)
Isolation: at application level both import shapes are fine —
import { createServer as a } from "http"; // typeof a === "function"
import { createServer as b } from "node:http"; // typeof b === "function"
so the builtin binding is lost specifically when the import lives inside a compilePackages-compiled dependency (or in the options.createServer || createServerHTTP module-scope reference path).
Expected: builtin imports inside compiled deps bind like app-level ones; hono serving over node:http works (was #589, closed — this appears to be a different, compilePackages-specific gap).
Full test: mobilitybroker24/monorepo spike/tests/09-hono.ts.
Env: perry 0.5.1512 built from
main@6173ff9f6, macOS arm64. MB24 Phase-0 spike.Symptom: with
@hono/node-server@1.19.17+hono@4.13.4inperry.compilePackages,serve({ fetch: app.fetch, port })crashes:@hono/node-server
dist/index.mjs:Isolation: at application level both import shapes are fine —
so the builtin binding is lost specifically when the import lives inside a
compilePackages-compiled dependency (or in theoptions.createServer || createServerHTTPmodule-scope reference path).Expected: builtin imports inside compiled deps bind like app-level ones; hono serving over node:http works (was #589, closed — this appears to be a different, compilePackages-specific gap).
Full test: mobilitybroker24/monorepo
spike/tests/09-hono.ts.