1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-09-16 09:41:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

fix: rndir path

This commit is contained in:
sunnylqm
2024-01-30 19:15:00 +08:00
parent 0f8cf3c399
commit f202fc590d

View File

@@ -173,7 +173,11 @@ async function compileHermesByteCode(
) { ) {
console.log(`Hermes enabled, now compiling to hermes bytecode:\n`); console.log(`Hermes enabled, now compiling to hermes bytecode:\n`);
// >= rn 0.69 // >= rn 0.69
const rnDir = path.dirname(require.resolve('react-native')); const rnDir = path.dirname(
require.resolve('react-native', {
paths: [process.cwd()],
}),
);
const hermesCommand = path.join( const hermesCommand = path.join(
rnDir, rnDir,
`/sdks/hermesc/${getHermesOSBin()}/hermesc`, `/sdks/hermesc/${getHermesOSBin()}/hermesc`,