Every other phase of the build runs flawlessly but it always fails at Task :app:createBundleReleaseJsAndAssets
even though my javascript bundles just fine and it doesn’t explicitly state that it failed.
Here is a repository with the source code: https://github.com/Natalius-dev/temp_expo_post
Here is a link to the build page if any expo employees see this: https://expo.dev/accounts/natalius_dev/projects/cc-cup-2023/builds/86000446-8803-4f29-831e-d0af42221027
> Task :app:createBundleReleaseJsAndAssets
warning: Bundler cache is empty, rebuilding (this may take a minute)
[stderr]
Error: Unable to resolve module ./lib/colors from /home/expo/workingdir/build/frontend/app/App.js:
[stderr]
None of these files exist:
[stderr]
* lib/colors(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
[stderr]
* lib/colors/index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
[stderr]
1 | import { StatusBar, StyleSheet, Text, TextInput, View } from 'react-native';
[stderr]
> 2 | import { colors } from './lib/colors';
[stderr]
| ^
[stderr]
3 | import { fonts } from './lib/fonts';
[stderr]
4 | import { useFonts } from 'expo-font';
[stderr]
5 | import { SafeAreaView } from 'react-native-safe-area-context';
[stderr]
Error: Unable to resolve module ./lib/colors from /home/expo/workingdir/build/frontend/app/App.js:
[stderr]
None of these files exist:
[stderr]
* lib/colors(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
[stderr]
* lib/colors/index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs)
[stderr]
1 | import { StatusBar, StyleSheet, Text, TextInput, View } from 'react-native';
[stderr]
> 2 | import { colors } from './lib/colors';
[stderr]
| ^
[stderr]
3 | import { fonts } from './lib/fonts';
[stderr]
4 | import { useFonts } from 'expo-font';
[stderr]
5 | import { SafeAreaView } from 'react-native-safe-area-context';
[stderr]
at ModuleResolver.resolveDependency (/home/expo/workingdir/build/frontend/app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:114:15)
[stderr]
at DependencyGraph.resolveDependency (/home/expo/workingdir/build/frontend/app/node_modules/metro/src/node-haste/DependencyGraph.js:277:43)
[stderr]
at Object.resolve (/home/expo/workingdir/build/frontend/app/node_modules/metro/src/lib/transformHelpers.js:169:21)
[stderr]
at Graph._resolveDependencies (/home/expo/workingdir/build/frontend/app/node_modules/metro/src/DeltaBundler/Graph.js:473:35)
[stderr]
at Graph._processModule (/home/expo/workingdir/build/frontend/app/node_modules/metro/src/DeltaBundler/Graph.js:261:38)
[stderr]
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[stderr]
at async Graph._addDependency (/home/expo/workingdir/build/frontend/app/node_modules/metro/src/DeltaBundler/Graph.js:372:20)
[stderr]
at async Promise.all (index 2)
[stderr]
at async Graph._processModule (/home/expo/workingdir/build/frontend/app/node_modules/metro/src/DeltaBundler/Graph.js:322:5)
[stderr]
at async Graph._traverseDependenciesForSingleFile (/home/expo/workingdir/build/frontend/app/node_modules/metro/src/DeltaBundler/Graph.js:249:5)
> Task :app:createBundleReleaseJsAndAssets FAILED
> Task :react-native-async-storage_async-storage:generateReleaseRFile
[stderr]
FAILURE: Build failed with an exception.
[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]
* Get more help at https://help.gradle.org
[stderr]
BUILD FAILED in 3m 18s
96 actionable tasks: 96 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.