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
fix: use file-local createRequire for relative lazy requires in src/
The require-shim.mjs anchors globalThis.require at the project root
(package.json), which works for node:* builtins but breaks relative
paths — require("../telemetry.js") resolves to /project-root/../
instead of relative to the calling file.
The shim assumed relative require() calls in src/ only ran during
script/*.ts tsx runs, but pnpm cli (which also uses tsx) hits both
db/index.ts and list-command.ts at runtime. db/index.ts crashed hard;
list-command.ts was silently swallowed by try/catch, leaving
getSubcommandsForRoute() always returning an empty map.
Fix: replace the global require() with a file-local createRequire
anchored to import.meta.url in each affected file. Update the shim
comment to reflect the constraint.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
0 commit comments