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
{{ message }}
This repository was archived by the owner on Oct 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 4, 2026. It is now read-only.
Web mode boot still fails on Node v22 after #1864 fix — ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING #2333
gsd --web fails to start on Node.js v22.13.0 with the same ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING error that #1864 was meant to fix. The fix in v2.42.0 switches from --experimental-strip-types to --experimental-transform-types when the package root is under node_modules/, but Node 22 blocks both flags for files under node_modules/.
The boot readiness check returns HTTP 500 three times, then aborts (the bug 2/3 fixes from #1864 work correctly — fast fail and error body are present).
Root Cause
resolveTypeStrippingFlag() doesn't help on Node 22
The fix in #1864 added resolveTypeStrippingFlag() (chunk 34431 in the standalone bundle):
On Node 22.13.0, this correctly returns --experimental-transform-types. However, Node 22 enforces ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING for both flags — the restriction applies to all native TypeScript handling for files under node_modules/, not just strip-types.
Verified directly:
$ node --version
v22.13.0
$ node --experimental-transform-types -e \
"require('/path/to/node_modules/gsd-pi/src/resources/extensions/gsd/auto-dashboard.ts')"
Error [ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING]: Stripping types is currently
unsupported for files under node_modules, for"/Users/navin/.proto/tools/node/globals/lib/node_modules/gsd-pi/src/resources/extensions/gsd/auto-dashboard.ts"
The subprocess in module 74900 (chunks/229.js) spawns:
execFile(process.execPath,["--import",resolve_ts_mjs_url,resolveTypeStrippingFlag(packageRoot),// ← "--experimental-transform-types" on 22.13"--input-type=module","--eval",script_that_imports_auto_ts], ...)
The --import resolve-ts.mjs registers a dist-redirect.mjs loader hook, but this doesn't bypass Node's pre-import type stripping check.
This restriction was only lifted in Node 23.6+
The ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING check for --experimental-transform-types was removed in nodejs/node#56785 (landed in Node 23.6). Node 22 LTS still enforces it for both flags.
Expected Behavior
The fix from #1864 should work on Node 22 LTS (current LTS line). Options:
Pre-compile src/resources/extensions/gsd/*.ts to JS at package build time, so subprocess workers import .js files that bypass the restriction entirely.
Copy .ts files to a temp dir outside node_modules/ before spawning subprocesses.
Document Node 23.6+ / 24 as the minimum for web mode if supporting Node 22 isn't feasible.
This is addressed by PR #2320 which resolves all 14 web subprocess module paths to compiled .js when under node_modules. If still failing after updating, please reopen with Node version details.
Activity
trek-e commentedon Mar 24, 2026
This is addressed by PR #2320 which resolves all 14 web subprocess module paths to compiled .js when under node_modules. If still failing after updating, please reopen with Node version details.