[GH-ISSUE #8597] [Bug] Build fails on Node 26.12.1: verifier source loader passes mode 'transform' to stripTypeScriptTypes #6665

Open
opened 2026-11-01 21:13:03 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @PonySlayer28 on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/8597

Summary

npm run build fails on Node.js v26.12.1 because scripts/lib/verifier-source-loader.mjs calls stripTypeScriptTypes with options that Node 26.12.1 rejects. package.json declares "node": "^22.23.4 || ^24.22.1 || >=26.12.1", so 26.12.1 is a supported version and the build should work on it.

Environment

  • OS: Windows 10 Pro 10.0.19045 (x64)
  • Node.js: v26.12.1 (installed via winget install OpenJS.NodeJS --version 26.12.1)
  • npm: 11.20.0
  • Git: 2.55.0.windows.5
  • Repo: main at d3ab0faf52a02ff5a618f3ed7beb608b78752abd (2026-11-01)
  • Shell: Git Bash / PowerShell 5.1 (both reproduce)

Steps to reproduce

git clone https://github.com/morluto/rea && cd rea
git submodule update --init --recursive   # see note below
npm ci
npm run build

npm ci completes (729 packages). npm run build then fails in the artifacts:skills step:

> node scripts/generate-skill-metadata.mjs
node:internal/modules/typescript:101
  validateOneOf(mode, 'options.mode', ['strip']);
TypeError [ERR_INVALID_ARG_VALUE]: The property 'options.mode' must be one of: 'strip'. Received 'transform'
    at Module.stripTypeScriptTypes (node:internal/modules/typescript:101:3)
    at loadSource (file:///.../scripts/lib/verifier-source-loader.mjs:98:24)
    at nextStep (node:internal/modules/customization_hooks:189:26)
    at loadWithHooks (node:internal/modules/customization_hooks:374:18)
    at #loadSync (node:internal/modules/esm/loader:832:16)
    at ModuleLoader.load (node:internal/modules/esm/loader:790:26)

The offending call is in scripts/lib/verifier-source-loader.mjs (around lines 98–102):

source: nodeModule.stripTypeScriptTypes(source, {
  mode: "transform",
  sourceMap: true,
  sourceUrl: url,
}),

On Node 26.12.1, stripTypeScriptTypes only accepts mode: "strip", and it also rejects sourceMap: true in strip mode.

Local attempt (not committed)

  1. Changed mode to "strip" and removed sourceMap. Build then fails with:
    TypeError: TypeScript parameter property is not supported in strip-only mode
    
    The verifier sources use TypeScript parameter properties, which strip-only mode cannot handle. So a simple option change is not enough. Either transform must stay (which Node 26.12.1 rejects here), or the affected sources need to be rewritten without parameter properties.
  • third_party/unblob cannot be checked out on Windows: its tree contains tests/integration/archive/ar/__output__/a1x01.ar_extract/<non-ASCII name>, which Git for Windows rejects as an invalid path (fatal: Unable to checkout '1fcc7a0a…' in submodule path 'third_party/unblob'). Submodule init for the other four submodules succeeds. Could the repo avoid shipping that fixture, or document a core.protectNTFS workaround?

Expected

  • npm run build succeeds on Node 26.12.1 on Windows.
  • Either stripTypeScriptTypes is called in a mode that Node 26.12.1 accepts, or the verifier sources avoid syntax that needs transform.

Suggested direction

  • Check whether Node 26.x changed the stripTypeScriptTypes contract (it now only accepts strip), and make the loader work with strip by avoiding TypeScript-only transform syntax in verifier sources, or
  • Pin the supported Node range for the build to versions where transform is accepted, and state that in engines / docs.
Originally created by @PonySlayer28 on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/8597 ## Summary `npm run build` fails on Node.js `v26.12.1` because `scripts/lib/verifier-source-loader.mjs` calls `stripTypeScriptTypes` with options that Node 26.12.1 rejects. `package.json` declares `"node": "^22.23.4 || ^24.22.1 || >=26.12.1"`, so 26.12.1 is a supported version and the build should work on it. ## Environment - OS: Windows 10 Pro 10.0.19045 (x64) - Node.js: `v26.12.1` (installed via `winget install OpenJS.NodeJS --version 26.12.1`) - npm: `11.20.0` - Git: `2.55.0.windows.5` - Repo: `main` at `d3ab0faf52a02ff5a618f3ed7beb608b78752abd` (2026-11-01) - Shell: Git Bash / PowerShell 5.1 (both reproduce) ## Steps to reproduce ```sh git clone https://github.com/morluto/rea && cd rea git submodule update --init --recursive # see note below npm ci npm run build ``` `npm ci` completes (729 packages). `npm run build` then fails in the `artifacts:skills` step: ``` > node scripts/generate-skill-metadata.mjs node:internal/modules/typescript:101 validateOneOf(mode, 'options.mode', ['strip']); TypeError [ERR_INVALID_ARG_VALUE]: The property 'options.mode' must be one of: 'strip'. Received 'transform' at Module.stripTypeScriptTypes (node:internal/modules/typescript:101:3) at loadSource (file:///.../scripts/lib/verifier-source-loader.mjs:98:24) at nextStep (node:internal/modules/customization_hooks:189:26) at loadWithHooks (node:internal/modules/customization_hooks:374:18) at #loadSync (node:internal/modules/esm/loader:832:16) at ModuleLoader.load (node:internal/modules/esm/loader:790:26) ``` The offending call is in `scripts/lib/verifier-source-loader.mjs` (around lines 98–102): ```js source: nodeModule.stripTypeScriptTypes(source, { mode: "transform", sourceMap: true, sourceUrl: url, }), ``` On Node 26.12.1, `stripTypeScriptTypes` only accepts `mode: "strip"`, and it also rejects `sourceMap: true` in strip mode. ## Local attempt (not committed) 1. Changed `mode` to `"strip"` and removed `sourceMap`. Build then fails with: ``` TypeError: TypeScript parameter property is not supported in strip-only mode ``` The verifier sources use TypeScript parameter properties, which strip-only mode cannot handle. So a simple option change is not enough. Either `transform` must stay (which Node 26.12.1 rejects here), or the affected sources need to be rewritten without parameter properties. ## Related notes - `third_party/unblob` cannot be checked out on Windows: its tree contains `tests/integration/archive/ar/__output__/a1x01.ar_extract/<non-ASCII name>`, which Git for Windows rejects as an invalid path (`fatal: Unable to checkout '1fcc7a0a…' in submodule path 'third_party/unblob'`). Submodule init for the other four submodules succeeds. Could the repo avoid shipping that fixture, or document a `core.protectNTFS` workaround? ## Expected - `npm run build` succeeds on Node 26.12.1 on Windows. - Either `stripTypeScriptTypes` is called in a mode that Node 26.12.1 accepts, or the verifier sources avoid syntax that needs `transform`. ## Suggested direction - Check whether Node 26.x changed the `stripTypeScriptTypes` contract (it now only accepts `strip`), and make the loader work with `strip` by avoiding TypeScript-only transform syntax in verifier sources, or - Pin the supported Node range for the build to versions where `transform` is accepted, and state that in `engines` / docs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6665
No description provided.