Skip to content

Commit 23847d2

Browse files
committed
scripts/github-actions: build-hext-node-linux: monkey-patch node-abi to report proper ABI version for 24.0.0
1 parent fe7b5f0 commit 23847d2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/github-actions/linux/build-hext-node-linux.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@ sudo make install
6161
cd "$LIBHEXTD/bindings/nodejs"
6262
npm install
6363
npm install prebuild
64-
cat node_modules/node-abi/package.json || true
65-
npm install "node-abi@^4.8.0"
66-
cat node_modules/node-abi/package.json || true
64+
65+
# Fix for "node-abi@3.75.0, node-abi@4.8.0 ABI version mismatch for Node 24.0.0 (v134 vs v137)"
66+
# https://github.com/electron/node-abi/issues/208
67+
sed -i 's/"abi": "134"/"abi": "137"/' $(find . -wholename "*node-abi/abi_registry.json")
68+
6769
npx prebuild \
6870
-t "$HEXT_NODE_API_VERSION1" \
6971
-t "$HEXT_NODE_API_VERSION2" \
@@ -82,7 +84,6 @@ npx prebuild \
8284
--CDCMAKE_BUILD_TYPE=Release
8385

8486

85-
grep "define NODE_MODULE_VERSION" $(find "$HOME" -name node_version.h)
8687
ls -1 prebuilds/
8788

8889

0 commit comments

Comments
 (0)