Closed douglasndm closed 1 year ago
hermesCommand = '../../../../node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc'
I think your path is not correct. The hermesCommand
path is relative from your app
folder.
What happens if you:
cd app && ../../../../node_modules/react-native/sdks/hermesc/osx-bin/hermesc
You should see something like:
Please choose output, e.g. -emit-binary. hermesc does not support -exec.
Example: hermesc -emit-binary -out myfile.hbc myfile.js
hermesCommand = '../../../../node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc'
I think your path is not correct. The
hermesCommand
path is relative from yourapp
folder. What happens if you:cd app && ../../../../node_modules/react-native/sdks/hermesc/osx-bin/hermesc
You should see something like:
Please choose output, e.g. -emit-binary. hermesc does not support -exec. Example: hermesc -emit-binary -out myfile.hbc myfile.js
Thanks a lot, that solve my problem.
From my app folder, I needed to go back only two folders and it fixed it.
Thanks guys! I think it is important to note here that app
folder here means where your root of your react native project lies (where your package.json is) and not the android/app/
folder where the build.gradle
is which you are editing. It was confusing to me. (The rest of the config is relative to android/app
)
Was this issue closed??
Description
I'm trying to upgrade to RN 0.71.1 from 0.70.6 and I used to use "project.ext.react" to set the "hermesCommand" path. Like this
but since I upgraded to RN 0.71.1 every time when I try to build a release build for Android I got this error
package.json of root
And package.json of the app
Version
0.71.1
Output of
npx react-native info
System: OS: macOS 13.0 CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz Memory: 111.01 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node Yarn: 1.22.19 - ~/.nvm/versions/node/v16.18.0/bin/yarn npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm Watchman: 2022.10.17.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9123335 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: 11.0.17 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: Not Found react-native: Not Found react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
Init a monorepo repository with this structure root (package.json) RN is Here -> packages -> app (package.json)
Correct the path in react config inside app/build.gradle
Try to build a release build with
Snack, code example, screenshot, or link to a repository