mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +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`);
|
console.log(`Hermes enabled, now compiling to hermes bytecode:\n`);
|
||||||
// >= rn 0.69
|
// >= rn 0.69
|
||||||
let hermesCommand = require.resolve(
|
const rnDir = path.dirname(require.resolve('react-native'));
|
||||||
`react-native/sdks/hermesc/${getHermesOSBin()}/hermesc`,
|
const hermesCommand = path.join(
|
||||||
{
|
rnDir,
|
||||||
paths: [process.cwd()],
|
`/sdks/hermesc/${getHermesOSBin()}/hermesc`,
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// < rn 0.69
|
// < rn 0.69
|
||||||
if (!fs.existsSync(hermesCommand)) {
|
if (!fs.existsSync(hermesCommand)) {
|
||||||
const hermesPackage = fs.existsSync('node_modules/hermes-engine')
|
const hermesPackage = fs.existsSync('node_modules/hermes-engine')
|
||||||
|
Reference in New Issue
Block a user