Running 'gradlew :app:assembleRelease' in /home/expo/workingdir/build/android
Task :expo-modules-core:buildCMakeRelWithDebInfo[x86] Task :app:createBundleReleaseJsAndAssets Error: Unable to resolve module expo-camera from /home/expo/workingdir/build/node_modules/@tensorflow/tfjs-react-native/dist/camera/camera_stream.js: expo-camera could not be found within the project or in these directories: node_modules 17 | import * as React from 'react'; 18 | import { StyleSheet, PixelRatio, Platform, } from 'react-native'; 19 | import { Camera } from 'expo-camera'; | ^ 20 | import { GLView } from 'expo-gl'; 21 | import { fromTexture, renderToGLView, detectGLCapabilities } from './camera'; 22 | const DEFAULT_AUTORENDER = true; Error: Unable to resolve module expo-camera from /home/expo/workingdir/build/node_modules/@tensorflow/tfjs-react-native/dist/camera/camera_stream.js: expo-camera could not be found within the project or in these directories: node_modules 17 | import * as React from 'react'; 18 | import { StyleSheet, PixelRatio, Platform, } from 'react-native'; 19 | import { Camera } from 'expo-camera'; | ^ 20 | import { GLView } from 'expo-gl'; 21 | import { fromTexture, renderToGLView, detectGLCapabilities } from './camera'; 22 | const DEFAULT_AUTORENDER = true; at ModuleResolver.resolveDependency (/home/expo/workingdir/build/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:138:15) at DependencyGraph.resolveDependency (/home/expo/workingdir/build/node_modules/metro/src/node-haste/DependencyGraph.js:231:43) at /home/expo/workingdir/build/node_modules/metro/src/lib/transformHelpers.js:156:21 at resolveDependencies (/home/expo/workingdir/build/node_modules/metro/src/DeltaBundler/buildSubgraph.js:42:25) at visit (/home/expo/workingdir/build/node_modules/metro/src/DeltaBundler/buildSubgraph.js:83:30) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 6) at async visit (/home/expo/workingdir/build/node_modules/metro/src/DeltaBundler/buildSubgraph.js:92:5) at async Promise.all (index 3) at async visit (/home/expo/workingdir/build/node_modules/metro/src/DeltaBundler/buildSubgraph.js:92:5) Task :app:createBundleReleaseJsAndAssets FAILED Task :expo-gl:buildCMakeRelWithDebInfo[armeabi-v7a]` FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':app:createBundleReleaseJsAndAssets'.
Process 'command 'node'' finished with non-zero exit value 1
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org. BUILD FAILED in 5m 43s 263 actionable tasks: 263 executed Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
these are my dependencies
"dependencies": { "@react-native-community/checkbox": "^0.5.17", "@react-navigation/native": "^6.1.14", "@react-navigation/native-stack": "^6.9.22", "@react-navigation/stack": "^6.3.25", "@tensorflow/tfjs": "^4.17.0", "@tensorflow/tfjs-converter": "^4.17.0", "@tensorflow/tfjs-react-native": "^1.0.0", "expo": "~50.0.8", "expo-linear-gradient": "~12.7.2", "expo-status-bar": "~1.11.1", "react": "18.2.0", "react-native": "0.73.4", "react-native-elements": "^3.4.3", "react-native-picker-select": "^9.0.1" }, "devDependencies": { "@babel/core": "^7.20.0" },
I have been trying to build my expo react-native project using EAS and the eas build -p android --profile preview have been failing due to expo-camera. When I deleted it because i'm not using it I got error- BUILD FAILURE: Build failed with an exception.
- What went wrong*
Execution failed for task ':app:createBundleReleaseJsAndAssets'.
error before deleting expo-camera
^~~~
/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:254658:41: warning: the variable "HTMLCanvasElement" was not declared in anonymous function " 8305#" ...his.canvas != null && typeof HTMLCanvasElement !== 'undefined' && this.can... ^~~~~~~~~~~~~~~~~ FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':expo-camera:compileReleaseKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org. BUILD FAILED in 5m 15s 216 actionable tasks: 216 executed Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.