Skip to content

Conversation

@gronxb
Copy link
Contributor

@gronxb gronxb commented Dec 19, 2025

Problem

Starting from 0.83, hermesc is no longer included in react-native.
It is included in the hermes-compiler package, which is a dependency of react-native.
Therefore, you need to use require.resolve to locate hermes-compiler within react-native’s path.

  • as-is
image
  • to-be
image

Reproduction Step

pnpm create rock@latest
cd my-rock-app
pnpm install
pnpm rock bundle --entry-file index.js --platform ios --hermes --bundle-output dist/index.ios.bundle --assets-dest dist --dev false

Ref

@vercel
Copy link

vercel bot commented Dec 19, 2025

@gronxb is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@gronxb gronxb changed the title fix: support hermes-compiler package for RN 0.83+ fix(tools): support hermes-compiler package for RN 0.83+ Dec 19, 2025
Comment on lines +20 to +22
const hermesCompilerPath = require.resolve('hermes-compiler/package.json', {
paths: [getReactNativePackagePath()],
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we need to respect other package managers, to import it correctly we shouldn’t base it on the project root; since React Native depends on it, we should locate hermes-compiler from React Native’s location

Copy link
Contributor

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@thymikee thymikee merged commit 483f8c6 into callstackincubator:main Dec 19, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants