mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 01:41:37 +08:00
fix: rndir path
This commit is contained in:
@@ -173,12 +173,12 @@ async function compileHermesByteCode(
|
||||
) {
|
||||
console.log(`Hermes enabled, now compiling to hermes bytecode:\n`);
|
||||
// >= rn 0.69
|
||||
let hermesCommand = require.resolve(
|
||||
`react-native/sdks/hermesc/${getHermesOSBin()}/hermesc`,
|
||||
{
|
||||
paths: [process.cwd()],
|
||||
},
|
||||
const rnDir = path.dirname(require.resolve('react-native'));
|
||||
const hermesCommand = path.join(
|
||||
rnDir,
|
||||
`/sdks/hermesc/${getHermesOSBin()}/hermesc`,
|
||||
);
|
||||
|
||||
// < rn 0.69
|
||||
if (!fs.existsSync(hermesCommand)) {
|
||||
const hermesPackage = fs.existsSync('node_modules/hermes-engine')
|
||||
|
Reference in New Issue
Block a user