You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hermes transforms not enabled by default when creating a new 0.70.0 project #34656
I agree, I have the same problem. However, if I add
{unstable_transformProfile: 'hermes-stable'}
to my babel config , I can't archive my project anymore with Xcode. Is it the same for you?
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'
We don't intend for unstable_transformProfile to be widely used, in particular because this doesn't consider the target Hermes version.
Short term: A fix may involve exposing a new option on metro-react-native-babel-preset, and fixing react-native-xcode.sh as above.
Medium term: We are looking at a better design for this that may include adding Hermes to browserslist and having the build system transparently respect this.
Reacted by Lorenzo Sciandra, Moti Zilberman, Nicola Corti and aminh-bc
To add to @huntie's comment: Longer-term solutions aside, we're looking to unblock the use of BigInt by removing the exponentiation operator transform (a ** b → Math.pow(a, b)) from metro-react-native-babel-preset altogether, given that both JSC and Hermes support this syntax natively. This will likely depend on react/metro#871, which will be part of the next Metro version.
Reacted by Nicola Corti, Lorenzo Sciandra, Alex Hunt, Steven Luscher and Ashoat Tevosyan
hey @motiz88 just to double-check, is it safe to say that this will be addressed in Metro 73 in RN71, by this commit facebook/metro@c2365bb ?
The BigInt issue that @steveluscher was having will be fixed in the default config at that point, yes. There will be no change to the experimental, unsupported transformProfile feature at this stage. (We are however exploring better designs for this, e.g adopting @babel/preset-env)
Activity
jcoulaud commentedon Sep 11, 2022
I agree, I have the same problem. However, if I add
to my babel config , I can't archive my project anymore with Xcode. Is it the same for you?
kelset commentedon Sep 13, 2022
Can confirm that this repro generates the error - I'll be passing this on the Hermes team so that they can help.
lexer commentedon Sep 19, 2022
@kelset is there any update or another issue we should track?
steveluscher commentedon Sep 20, 2022
Yeah, interesting. I just tried this myself. The build step when you do
Project > Archiveis created in , and ends up looking like this:If I create a
.xcode.env.localfile in theios/directory, and add this:…
--minify falsegets added to that command and the build works.Essentially,
node_modules/react-native/scripts/react-native-xcode.shdoesn't pick up the fact that Hermes is enabled inPodfile.huntie commentedon Sep 20, 2022
Thanks for the valid workarounds!
Forwarding some conversations from the team:
unstable_transformProfileto be widely used, in particular because this doesn't consider the target Hermes version.metro-react-native-babel-preset, and fixingreact-native-xcode.shas above.motiz88 commentedon Sep 20, 2022
To add to @huntie's comment: Longer-term solutions aside, we're looking to unblock the use of BigInt by removing the exponentiation operator transform (
a ** b→Math.pow(a, b)) frommetro-react-native-babel-presetaltogether, given that both JSC and Hermes support this syntax natively. This will likely depend on react/metro#871, which will be part of the next Metro version.metro-react-native-babel-preset: Remove exponentiation operator trans…
kelset commentedon Oct 4, 2022
hey @motiz88 just to double-check, is it safe to say that this will be addressed in Metro 73 in RN71, by this commit react/metro@c2365bb ?
motiz88 commentedon Oct 4, 2022
The BigInt issue that @steveluscher was having will be fixed in the default config at that point, yes. There will be no change to the experimental, unsupported
transformProfilefeature at this stage. (We are however exploring better designs for this, e.g adopting@babel/preset-env)github-actions commentedon Apr 9, 2023
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
github-actions commentedon Apr 16, 2023
This issue was closed because it has been stalled for 7 days with no activity.