re-natal
re-natal copied to clipboard
RN 57 lein prod-build crashes: "goog.global is not an Object."
Running xcode 10.1, re-natal 0.10.0.
Steps to reproduce:
re-natal init testapp -i reagent6
lein prod-build
re-natal xcode
- Now in the xCode window set the required build signing and run the project.
- The app crashes on startup with:
Exception: goog.global is not an Object. (evaluating '"StopIteration" in goog.global')
Any ideas? This does not happen in re-natal 0.9. Thanks!
May be the same as the advanced-build issue https://github.com/drapanjanas/re-natal/issues/210
As mentioned there, the patch in https://github.com/drapanjanas/re-natal/issues/203 does not solve the problem.
This is resolved by removing the ignores that were recently added to .babelrc. So the entire .babelrc should be:
{
"presets": [
"module:metro-react-native-babel-preset"
]
}
If someone wants to explain why the ignores were added (and why they cause a problem), please comment!
This is resolved by removing the ignores that were recently added to .babelrc. So the entire .babelrc should be:
{ "presets": [ "module:metro-react-native-babel-preset" ] }
If someone wants to explain why the ignores were added (and why they cause a problem), please comment!
It fixed goog.global is not an Object
, however after removing ignores there is a new error ...
ReactNativeJS: undefined is not an object (evaluating 'this.__reactAutoBindPairs')
ReactNative: ReactInstanceManager.detachViewFromInstance()
@CalderBot my npm stack blows if i remove ignores for .babelrc have you encountered that?
@StankovicMarko Just retried (node v9.8.0, npm v5.6.0, xcode v10.2) and it worked fine for me. Sorry. Here were the steps:
Install:
re-natal init testapp -i reagent6
cd testapp
Fix .babelrc:
cat <<EOF > .babelrc
{
"presets": [
"module:metro-react-native-babel-preset"
]
}
EOF
lein prod-build
re-natal xcode
Then in xcode:
- add signing identities
- [OPTIONAL] product > scheme > edit scheme > Build Configuration > Run > change “Debug” to “Release”
- Build and Run the project (xcode play button)
@CalderBot i am basically doing the same but with android and this is what i get https://github.com/drapanjanas/re-natal/issues/220 i even did example app out the box with steps in 220 issue but it still persists
Do you have any advice for me how to continue?
Is it possible to get code in such state where it would compile but apk is faulty?
It helps a lot! Thank you!