From 2fab86863ae3dc1c8dfdaf7714dda7a9058f7b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BA=A3i=20Quang?= Date: Sat, 23 May 2026 22:20:47 +0700 Subject: [PATCH] fix: support hermes-compiler path for React Native 0.83+ RN 0.83+ removed node_modules/react-native/sdks/hermesc and moved Hermes to the hermes-compiler npm package. Without this fix, the CLI falls back to hermesvm which no longer exists, causing ENOENT errors. New path: node_modules/hermes-compiler/hermesc//hermesc Co-Authored-By: Claude Sonnet 4.6 --- src/lib/react-native-utils.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/react-native-utils.ts b/src/lib/react-native-utils.ts index 7401ad38..7db28135 100644 --- a/src/lib/react-native-utils.ts +++ b/src/lib/react-native-utils.ts @@ -602,6 +602,17 @@ function getHermesCommand(): string { if (fileExists(hermesEngine)) { return hermesEngine; } + // RN 0.83+: hermes moved to hermes-compiler npm package + const hermesCompiler = path.join( + 'node_modules', + 'hermes-compiler', + 'hermesc', + getHermesOSBin(), + getHermesOSExe() + ); + if (fileExists(hermesCompiler)) { + return hermesCompiler; + } return path.join('node_modules', 'hermesvm', getHermesOSBin(), 'hermes'); }