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

expo production build error #47

Open
mardo opened this issue May 29, 2023 · 1 comment
Open

expo production build error #47

mardo opened this issue May 29, 2023 · 1 comment

Comments

@mardo
Copy link

mardo commented May 29, 2023

Hello! I am having an issue creating a production build for android in my app.

I also tried creating a brand new code base with npx cli-rn new newProject and had the same issue without modifying the generated code.

I'm running eas build --platform android, and the build fails with these logs at the end:

> Task :app:createBundleReleaseJsAndAssets
warning: the transform cache was reset.
Welcome to Metro v0.73.9
              Fast - Scalable - Integrated
> Task :expo-updates:createReleaseExpoManifest FAILED
[stderr] 
Error: @build-script-error-begin
[stderr] 
Error loading assets JSON from Metro. Ensure you've followed all expo-updates installation steps correctly. node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: /home/expo/workingdir/build/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: /home/expo/workingdir/build/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: helperSkipTransparentExpressionWrappers.skipTransparentExprWrapperNodes is not a function
[stderr] 
@build-script-error-end
[stderr] 
    at /home/expo/workingdir/build/node_modules/expo-updates/scripts/createManifest.js:59:11
[stderr] 
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
> Task :react-native-picker_picker:compileReleaseJavaWithJavac
[stderr] 
Note: Some input files use or override a deprecated API.
[stderr] 
Note: Recompile with -Xlint:deprecation for details.
> Task :react-native-async-storage_async-storage:compileReleaseJavaWithJavac
> Task :react-native-community_masked-view:compileReleaseJavaWithJavac
[stderr] 
Note: /home/expo/workingdir/build/node_modules/@react-native-async-storage/async-storage/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageModule.java uses or overrides a deprecated API.
[stderr] 
Note: Recompile with -Xlint:deprecation for details.
[stderr] 
Note: /home/expo/workingdir/build/node_modules/@react-native-async-storage/async-storage/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStoragePackage.java uses unchecked or unsafe operations.
[stderr] 
Note: Recompile with -Xlint:unchecked for details.
> Task :expo-dev-client:compileReleaseJavaWithJavac
> Task :app:createBundleReleaseJsAndAssets
TypeError: /home/expo/workingdir/build/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: /home/expo/workingdir/build/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: helperSkipTransparentExpressionWrappers.skipTransparentExprWrapperNodes is not a function
    at transform (/home/expo/workingdir/build/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js:123:59)
    at PluginPass.OptionalCallExpression|OptionalMemberExpression (/home/expo/workingdir/build/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js:206:9)
    at newFn (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/visitors.js:149:21)
    at NodePath._call (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/path/context.js:45:20)
    at NodePath.call (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/path/context.js:35:17)
    at NodePath.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/path/context.js:80:31)
    at TraversalContext.visitQueue (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:86:16)
    at TraversalContext.visitSingle (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:65:19)
    at TraversalContext.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:109:19)
    at traverseNode (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
    at NodePath.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/path/context.js:86:52)
    at TraversalContext.visitQueue (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:86:16)
    at TraversalContext.visitMultiple (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:61:17)
    at TraversalContext.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:107:19)
    at traverseNode (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
    at NodePath.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/path/context.js:86:52)
    at TraversalContext.visitQueue (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:86:16)
    at TraversalContext.visitSingle (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:65:19)
    at TraversalContext.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:109:19)
    at traverseNode (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
    at NodePath.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/path/context.js:86:52)
    at TraversalContext.visitQueue (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:86:16)
    at TraversalContext.visitMultiple (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:61:17)
    at TraversalContext.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:107:19)
    at traverseNode (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
    at NodePath.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/path/context.js:86:52)
    at TraversalContext.visitQueue (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:86:16)
    at TraversalContext.visitSingle (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:65:19)
    at TraversalContext.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:109:19)
    at traverseNode (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
    at NodePath.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/path/context.js:86:52)
    at TraversalContext.visitQueue (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:86:16)
    at TraversalContext.visitSingle (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:65:19)
    at TraversalContext.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:109:19)
    at traverseNode (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
    at NodePath.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/path/context.js:86:52)
    at TraversalContext.visitQueue (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:86:16)
    at TraversalContext.visitMultiple (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:61:17)
    at TraversalContext.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:107:19)
    at traverseNode (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
    at NodePath.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/path/context.js:86:52)
    at TraversalContext.visitQueue (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:86:16)
    at TraversalContext.visitSingle (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:65:19)
    at TraversalContext.visit (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/context.js:109:19)
    at traverseNode (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
    at traverse (/home/expo/workingdir/build/node_modules/@babel/traverse/lib/index.js:49:34)
    at transformFile (/home/expo/workingdir/build/node_modules/@babel/core/lib/transformation/index.js:81:29)
    at transformFile.next (<anonymous>)
    at run (/home/expo/workingdir/build/node_modules/@babel/core/lib/transformation/index.js:24:12)
[stderr] 
error node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: /home/expo/workingdir/build/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: /home/expo/workingdir/build/node_modules/react-native-gesture-handler/src/handlers/gestures/GestureDetector.tsx: helperSkipTransparentExpressionWrappers.skipTransparentExprWrapperNodes is not a function
> Task :app:createBundleReleaseJsAndAssets FAILED
> Task :expo-modules-core:compileReleaseKotlin
w: Argument -Xopt-in is deprecated. Please use -opt-in instead
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/adapters/react/permissions/PermissionsService.kt:157:30 'getPackageInfo(String, Int): PackageInfo!' is deprecated. Deprecated in Java
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/core/utilities/EmulatorUtilities.kt:30:13 'SERIAL: String!' is deprecated. Deprecated in Java
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/Promise.kt:68:18 This declaration overrides deprecated member but not marked as deprecated itself. This deprecation won't be inherited in future releases. Please add @Deprecated annotation or suppress. See https://youtrack.jetbrains.com/issue/KT-47902 for details
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/activityresult/ActivityResultsManager.kt:52:24 Parameter 'activity' is never used
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/activityresult/AppContextActivityResultRegistry.kt:119:51 'getParcelableExtra(String!): T?' is deprecated. Deprecated in Java
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/activityresult/AppContextActivityResultRegistry.kt:180:26 'getParcelable(String?): T?' is deprecated. Deprecated in Java
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/activityresult/AppContextActivityResultRegistry.kt:271:83 'getParcelable(String?): T?' is deprecated. Deprecated in Java
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/activityresult/DataPersistor.kt:67:20 'getSerializable(String?): Serializable?' is deprecated. Deprecated in Java
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/activityresult/DataPersistor.kt:85:26 'getSerializable(String?): Serializable?' is deprecated. Deprecated in Java
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/events/KModuleEventEmitterWrapper.kt:90:7 'constructor Event<T : Event<(raw) Event<*>>!>(Int)' is deprecated. Deprecated in Java
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/jni/JavaScriptObject.kt:59:33 Parameter 'null' is never used
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/jni/JavaScriptObject.kt:100:5 Parameter 'null' is never used
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/modules/Module.kt:43:7 'coroutineScope: CoroutineScope' is deprecated. Use a scope from the AppContext
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/types/Either.kt:24:11 Parameter 'type' is never used
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/types/Either.kt:27:11 Parameter 'type' is never used
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/types/Either.kt:44:11 Parameter 'type' is never used
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/types/Either.kt:59:11 Parameter 'type' is never used
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/types/JSTypeConverterHelper.kt:44:17 'get(String!): Any?' is deprecated. Deprecated in Java
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/views/ViewManagerDefinitionBuilder.kt:125:30 'ViewGroupDefinitionLegacyBuilder' is deprecated. Use `ViewGroupDefinitionBuilder` instead.
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/views/ViewManagerDefinitionBuilder.kt:128:38 'ViewGroupDefinitionLegacyBuilder' is deprecated. Use `ViewGroupDefinitionBuilder` instead.
[stderr] 
FAILURE: Build completed with 3 failures.
[stderr] 
1: Task failed with an exception.
[stderr] 
-----------
[stderr] 
* What went wrong:
[stderr] 
Execution failed for task ':expo-updates:createReleaseExpoManifest'.
[stderr] 
> Process 'command 'node'' finished with non-zero exit value 1
[stderr] 
* Try:
[stderr] 
> Run with --stacktrace option to get the stack trace.
[stderr] 
> Run with --info or --debug option to get more log output.
[stderr] 
> Run with --scan to get full insights.
[stderr] 
==============================================================================
[stderr] 
2: Task failed with an exception.
[stderr] 
-----------
[stderr] 
* What went wrong:
[stderr] 
java.lang.StackOverflowError (no error message)
[stderr] 
* Try:
[stderr] 
> Run with --stacktrace option to get the stack trace.
[stderr] 
> Run with --info or --debug option to get more log output.
[stderr] 
> Run with --scan to get full insights.
[stderr] 
==============================================================================
[stderr] 
3: Task failed with an exception.
[stderr] 
-----------
[stderr] 
* What went wrong:
[stderr] 
Execution failed for task ':app:createBundleReleaseJsAndAssets'.
[stderr] 
> Process 'command 'node'' finished with non-zero exit value 1
[stderr] 
* Try:
[stderr] 
> Run with --stacktrace option to get the stack trace.
[stderr] 
> Run with --info or --debug option to get more log output.
[stderr] 
> Run with --scan to get full insights.
[stderr] 
==============================================================================
[stderr] 
* Get more help at https://help.gradle.org
[stderr] 
BUILD FAILED in 4m 7s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
296 actionable tasks: 296 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Any help is greatly appreciated! Thanks!

@mardo
Copy link
Author

mardo commented May 29, 2023

Removing "@babel/plugin-proposal-export-namespace-from" from plugins in babel.config.js fixes the build problem.

Looks like adding that is required for web support, which I don't need for the app I'm building, so it is fine for me to remove it. However, looks like still an issue if you're interested in web support.

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

No branches or pull requests

1 participant