Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hermes transforms (unstable_transformProfile: 'hermes-stable') prevents from archiving the project in Xcode #34663

Closed
jcoulaud opened this issue Sep 12, 2022 · 1 comment
Labels
API: Transforms Needs: Triage 🔍 Tech: Hermes Hermes Engine: https://hermesengine.dev/

Comments

@jcoulaud
Copy link

Description

Since August, Hermes JavaScript engine is enabled by default on brand new projects but not the Hermes code transforms.
So, to work with BigInt and not have the following error

bash ERROR  TypeError: Cannot convert BigInt to number

, I need to enable them in my babel.config.js as stated in the Solana guide:

  module.exports = {
-   presets: ['module:metro-react-native-babel-preset'],
+   presets: [
+     [
+       'module:metro-react-native-babel-preset',
+       {unstable_transformProfile: 'hermes-stable'},
+     ],
+   ],
};

But, doing that, I can't archive my project on Xcode anymore. I get this error while trying:

error: File /Users/julien/Library/Developer/Xcode/DerivedData/test-bwyhfbhfgywuwjdqadmluvempaqw/Build/Intermediates.noindex/ArchiveIntermediates/test/BuildProductsPath/Release-iphoneos/test.app/main.jsbundle does not exist. This must be a bug with React Native, please report it here: https://github.com/facebook/react-native/issues'

PS: There is also this other issue related to the same problem

Version

0.70.0

Output of npx react-native info

System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 1.47 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
    Watchman: 2022.09.05.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8815526
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0
    react-native: 0.70.0 => 0.70.0
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. Create a new project
npx react-native@0.70.0 init test
cd test
  1. Add the following code to App.js
console.log(2n ** 42n);
  1. Try to archive the project on Xcode
error: File /Users/julien/Library/Developer/Xcode/DerivedData/test-bwyhfbhfgywuwjdqadmluvempaqw/Build/Intermediates.noindex/ArchiveIntermediates/test/BuildProductsPath/Release-iphoneos/test.app/main.jsbundle does not exist. This must be a bug with React Native, please report it here: https://github.com/facebook/react-native/issues'

Snack, code example, screenshot, or link to a repository

https://snack.expo.dev/@jcoulaud/bigint-with-non-hermes-transform

@kelset kelset added the Tech: Hermes Hermes Engine: https://hermesengine.dev/ label Sep 13, 2022
@kelset
Copy link
Contributor

kelset commented Sep 13, 2022

duplicate of #34656

@kelset kelset closed this as completed Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: Transforms Needs: Triage 🔍 Tech: Hermes Hermes Engine: https://hermesengine.dev/
Projects
None yet
Development

No branches or pull requests

3 participants