From 6ab3f64443660742dc581601a12a8cf2b2da3d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Magyar?= Date: Tue, 9 Jun 2026 19:02:06 +0100 Subject: [PATCH] fix(ci): drop the broken `-t 22` from prebuildify (build-tree-sitter-prebuilds) (#2121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The native build step ran `prebuildify --napi --strip -t 22`, but prebuildify parses the bare `-t 22` as the NUMBER 22 and crashes in resolveTargets (`TypeError: v.indexOf is not a function`) — so every matrix job (c/dart/proto/ kotlin × 6 tuples) failed on its first real run. N-API prebuilds are Node-version-agnostic, so `-t ` is both wrong and the cause; drop it. Verified locally: `prebuildify --napi --strip` builds the vendored c source cleanly into prebuilds//tree-sitter-c.node and exports napi_register_module_v1. --- .github/workflows/build-tree-sitter-prebuilds.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-tree-sitter-prebuilds.yml b/.github/workflows/build-tree-sitter-prebuilds.yml index 91fc5d884..992f68efe 100644 --- a/.github/workflows/build-tree-sitter-prebuilds.yml +++ b/.github/workflows/build-tree-sitter-prebuilds.yml @@ -320,9 +320,12 @@ jobs: test -f "$pkgdir/binding.gyp" || { echo "::error::no binding.gyp for $NAME@$REF"; exit 1; } - # N-API, stripped, single ABI-stable binary for THIS host's arch. - # prebuildify emits prebuilds/-/.node. - ( cd "$pkgdir" && npx --no-install prebuildify --napi --strip -t 22 ) + # N-API, stripped, single ABI-stable binary for THIS host's arch. No + # `-t `: an N-API prebuild is Node-version-agnostic, and + # prebuildify parses a bare `-t 22` as the NUMBER 22 and crashes + # (`v.indexOf is not a function`). prebuildify emits + # prebuilds/-/.node. + ( cd "$pkgdir" && npx --no-install prebuildify --napi --strip ) out=$(find "$pkgdir/prebuilds" -name '*.node' -print -quit) test -n "$out" || { echo "::error::prebuildify produced no .node"; exit 1; }