Comments (3)
hi there,
- you appear to be using both npm and yarn - your repo has a package-lock.json and yarn.lock. if you follow the instructions from the monorepos guide this will indeed work.
- this is not actually called "autolinking" - this refers to linking of native packages.
- here is an example you can try initializing from / comparing yours to: https://github.com/expo/examples/tree/master/with-yarn-workspaces
from expo.
- linking of native packages
This example doesn't work.
I created a project using npx create-react-native-app --template with-yarn-workspaces
without making any changes, then compiled it with eas build --platform android --profile production
, but it still gives an error:
Running 'gradlew :app:bundleRelease' in /home/expo/workingdir/build/apps/mobile/android
Downloading https://services.gradle.org/distributions/gradle-8.6-all.zip
10%.
20%.
30%.
40%
50%.
60%.
70%.
80
%.
90
%.
100%
Welcome to Gradle 8.6!
Here are the highlights of this release:
- Configurable encryption key for configuration cache
- Build init improvements
- Build authoring improvements
For more details see https://docs.gradle.org/8.6/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.6/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable
> Task :gradle-plugin:checkKotlinGradlePluginConfigurationErrors
> Task :gradle-plugin:pluginDescriptors
> Task :gradle-plugin:processResources
> Task :gradle-plugin:compileKotlin
> Task :gradle-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:classes
> Task :gradle-plugin:jar
> Configure project :expo-modules-core
Warning: Errors during XML parse:
Warning: Additionally, the fallback loader failed to parse the XML.
Checking the license for package NDK (Side by side) 26.1.10909125 in /home/expo/Android/Sdk/licenses
License for package NDK (Side by side) 26.1.10909125 accepted.
Preparing "Install NDK (Side by side) 26.1.10909125 v.26.1.10909125".
"Install NDK (Side by side) 26.1.10909125 v.26.1.10909125" ready.
Installing NDK (Side by side) 26.1.10909125 in /home/expo/Android/Sdk/ndk/26.1.10909125
"Install NDK (Side by side) 26.1.10909125 v.26.1.10909125" complete.
"Install NDK (Side by side) 26.1.10909125 v.26.1.10909125" finished.
> Configure project :expo
Using expo modules
- �[32mexpo-asset�[0m (10.0.6)
- �[32mexpo-constants�[0m (16.0.1)
- �[32mexpo-file-system�[0m (17.0.1)
- �[32mexpo-font�[0m (12.0.4)
- �[32mexpo-keep-awake�[0m (13.0.1)
- �[32mexpo-modules-core�[0m (1.12.9)
Checking the license for package Android SDK Build-Tools 34 in /home/expo/Android/Sdk/licenses
License for package Android SDK Build-Tools 34 accepted.
Preparing "Install Android SDK Build-Tools 34 v.34.0.0".
"Install Android SDK Build-Tools 34 v.34.0.0" ready.
Installing Android SDK Build-Tools 34 in /home/expo/Android/Sdk/build-tools/34.0.0
"Install Android SDK Build-Tools 34 v.34.0.0" complete.
"Install Android SDK Build-Tools 34 v.34.0.0" finished.
Checking the license for package Android SDK Platform 34 in /home/expo/Android/Sdk/licenses
License for package Android SDK Platform 34 accepted.
Preparing "Install Android SDK Platform 34 (revision 3)".
"Install Android SDK Platform 34 (revision 3)" ready.
Installing Android SDK Platform 34 in /home/expo/Android/Sdk/platforms/android-34
"Install Android SDK Platform 34 (revision 3)" complete.
"Install Android SDK Platform 34 (revision 3)" finished.
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable
> Task :expo-asset:preBuild UP-TO-DATE
> Task :expo-asset:preReleaseBuild UP-TO-DATE
> Task :expo-asset:generateReleaseResValues
> Task :expo-asset:generateReleaseResources
> Task :expo-constants:createExpoConfig
> Task :expo-constants:preBuild
> Task :expo-constants:preReleaseBuild
> Task :expo-constants:generateReleaseResValues
> Task :expo-constants:generateReleaseResources
> Task :expo-constants:packageReleaseResources
> Task :expo-file-system:preBuild
UP-TO-DATE
> Task :expo-file-system:preReleaseBuild
UP-TO-DATE
> Task :expo-asset:packageReleaseResources
> Task :expo-font:preBuild
UP-TO-DATE
> Task :expo-font:preReleaseBuild
UP-TO-DATE
> Task :expo-file-system:generateReleaseResValues
> Task :expo-file-system:generateReleaseResources
> Task :expo-font:generateReleaseResValues
> Task :expo-font:generateReleaseResources
> Task :expo-font:packageReleaseResources
> Task :expo-keep-awake:preBuild
UP-TO-DATE
> Task :expo-keep-awake:preReleaseBuild
UP-TO-DATE
> Task :expo-keep-awake:generateReleaseResValues
> Task :expo-keep-awake:generateReleaseResources
> Task :expo-keep-awake:packageReleaseResources
> Task :expo-modules-core:preBuild
UP-TO-DATE
> Task :expo-modules-core:preReleaseBuild
UP-TO-DATE
> Task :expo-file-system:packageReleaseResources
> Task :expo-modules-core:generateReleaseResValues
> Task :expo-modules-core:generateReleaseResources
> Task :expo-asset:extractDeepLinksRelease
> Task :expo-modules-core:packageReleaseResources
> Task :expo-constants:extractDeepLinksRelease
> Task :expo-asset:processReleaseManifest
> Task :expo-file-system:extractDeepLinksRelease
> Task :expo:generateExpoModulesPackageListTask
> Task :expo:preBuild
> Task :expo:preReleaseBuild
> Task :expo:generateReleaseResValues
> Task :expo:generateReleaseResources
> Task :expo:packageReleaseResources
> Task :expo:extractDeepLinksRelease
> Task :expo-constants:processReleaseManifest
> Task :expo-font:extractDeepLinksRelease
> Task :expo-file-system:processReleaseManifest
/home/expo/workingdir/build/node_modules/expo-file-system/android/src/main/AndroidManifest.xml:6:9-8:20 Warning:
provider#expo.modules.filesystem.FileSystemFileProvider@android:authorities was tagged at AndroidManifest.xml:6 to replace other declarations but no other declaration present
> Task :expo-keep-awake:extractDeepLinksRelease
> Task :expo-font:processReleaseManifest
> Task :expo-modules-core:extractDeepLinksRelease
> Task :expo-modules-core:processReleaseManifest
/home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/AndroidManifest.xml:8:9-11:45 Warning:
meta-data#com.facebook.soloader.enabled@android:value was tagged at AndroidManifest.xml:8 to replace other declarations but no other declaration present
> Task :expo-keep-awake:processReleaseManifest
> Task :expo:processReleaseManifest
> Task :expo:writeReleaseAarMetadata
> Task :expo-asset:writeReleaseAarMetadata
> Task :expo-file-system:writeReleaseAarMetadata
> Task :expo-constants:writeReleaseAarMetadata
> Task :expo-font:writeReleaseAarMetadata
> Task :expo-keep-awake:writeReleaseAarMetadata
> Task :expo-modules-core:writeReleaseAarMetadata
> Task :expo-asset:compileReleaseLibraryResources
> Task :expo:compileReleaseLibraryResources
> Task :expo:parseReleaseLocalResources
> Task :expo:generateReleaseRFile
> Task :expo-asset:parseReleaseLocalResources
> Task :expo-asset:generateReleaseRFile
> Task :expo-constants:compileReleaseLibraryResources
> Task :expo-constants:parseReleaseLocalResources
> Task :expo-constants:generateReleaseRFile
> Task :expo-file-system:compileReleaseLibraryResources
> Task :expo-file-system:parseReleaseLocalResources
> Task :expo-file-system:generateReleaseRFile
> Task :expo-font:compileReleaseLibraryResources
> Task :expo-font:parseReleaseLocalResources
> Task :expo-font:generateReleaseRFile
> Task :expo-keep-awake:compileReleaseLibraryResources
> Task :expo-keep-awake:parseReleaseLocalResources
> Task :expo-keep-awake:generateReleaseRFile
> Task :expo-modules-core:compileReleaseLibraryResources
> Task :expo-modules-core:parseReleaseLocalResources
> Task :expo-modules-core:generateReleaseRFile
> Task :expo:checkKotlinGradlePluginConfigurationErrors
> Task :expo:generateReleaseBuildConfig
> Task :expo-asset:checkKotlinGradlePluginConfigurationErrors
> Task :expo-asset:generateReleaseBuildConfig
> Task :expo-modules-core:checkKotlinGradlePluginConfigurationErrors
> Task :expo-modules-core:generateReleaseBuildConfig
> Task :app:createBundleReleaseJsAndAssets
warning: Bundler cache is empty, rebuilding (this may take a minute)
> Task :expo-modules-core:compileReleaseKotlin
> Task :app:createBundleReleaseJsAndAssets
Error: While trying to resolve module `expo-custom` from file `/home/expo/workingdir/build/apps/mobile/App.js`, the package `/home/expo/workingdir/build/node_modules/expo-custom/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`/home/expo/workingdir/build/node_modules/expo-custom/build/index.js`. Indeed, none of these files exist:
* /home/expo/workingdir/build/node_modules/expo-custom/build/index.js(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
* /home/expo/workingdir/build/node_modules/expo-custom/build/index.js/index(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
Error: While trying to resolve module `expo-custom` from file `/home/expo/workingdir/build/apps/mobile/App.js`, the package `/home/expo/workingdir/build/node_modules/expo-custom/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`/home/expo/workingdir/build/node_modules/expo-custom/build/index.js`. Indeed, none of these files exist:
* /home/expo/workingdir/build/node_modules/expo-custom/build/index.js(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
* /home/expo/workingdir/build/node_modules/expo-custom/build/index.js/index(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
at DependencyGraph.resolveDependency (/home/expo/workingdir/build/node_modules/metro/src/node-haste/DependencyGraph.js:243:17)
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 2)
at async visit (/home/expo/workingdir/build/node_modules/metro/src/DeltaBundler/buildSubgraph.js:92:5)
at async Promise.all (index 0)
at async buildSubgraph (/home/expo/workingdir/build/node_modules/metro/src/DeltaBundler/buildSubgraph.js:103:3)
at async Graph._buildDelta (/home/expo/workingdir/build/node_modules/metro/src/DeltaBundler/Graph.js:157:22)
> Task :app:createBundleReleaseJsAndAssets FAILED
> Task :expo-modules-core:compileReleaseKotlin
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/adapters/react/permissions/PermissionsService.kt:20:26 'Promise' is deprecated. AsyncFunction will crash when called. Use expo.modules.kotlin.Promise instead
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/adapters/react/permissions/PermissionsService.kt:63:51 'Promise' is deprecated. AsyncFunction will crash when called. Use expo.modules.kotlin.Promise instead
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/adapters/react/permissions/PermissionsService.kt:90:54 'Promise' is deprecated. AsyncFunction will crash when called. Use expo.modules.kotlin.Promise instead
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/defaultmodules/CoreModule.kt:6:34 'ReactFeatureFlags' is deprecated. Deprecated in Java
w: file:///home/expo/workingdir/build/node_modules/expo-modules-core/android/src/main/java/expo/modules/kotlin/defaultmodules/CoreModule.kt:71:12 'ReactFeatureFlags' 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:97: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/types/JSTypeConverterHelper.kt:44:17 'get(String!): Any?' is deprecated. Deprecated in Java
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 3m 35s
71 actionable tasks: 71 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
from expo.
@Mfweb - you need to add a step to run yarn build
in expo-custom directory, eg:
+++ b/packages/expo-custom/package.json
@@ -11,6 +11,7 @@
"lint": "expo-module lint",
"test": "expo-module test",
"prepublishOnly": "expo-module prepublishOnly",
+ "postinstall": "yarn build",
"expo-module": "expo-module"
},
https://docs.expo.dev/build-reference/build-with-monorepos/
from expo.
Related Issues (20)
- npx expo lint gives a maximum call stack size exceeded HOT 2
- Hi guys, wouldn't MMKV be a better option than AsyncStorage? Why isn't he at Expo Management? HOT 1
- After updating to expo 51, dev-build keeps on refreshing HOT 1
- Static output for web not respecting public/index.html HOT 2
- After upgrade from 50.0.17 to 51.0.4 getting on Apple submission ITMS-90078: Missing Push Notification Entitlement HOT 6
- useLocalSearchParams should not use Partial HOT 1
- useLocalSearchParams should not use Partial for params HOT 4
- Crash bug in Expo Go HOT 3
- expo export hangs when using css import from nativewind HOT 2
- [docs] possible inconsistency on SafeAreaProvider in Expo Router docs HOT 4
- Can not react app on expo HOT 2
- [SDK 51] expo-sensors 13.0.6 crash HOT 2
- use react-native-bluetooth-escpos-printer. build Task :app:compileReleaseKotlin FAILED HOT 5
- Expo SDK 51 - RN 0.74.1 - Error: Cannot find module 'expo/package.json' | Invalid `Podfile` file: cannot load such file -- ./scripts/autolinking. HOT 2
- Expo AV setRateAsync() corrects pitch everytime on Windows browser in development build irrespective of "shouldCorrectPitch" parameter HOT 1
- [expo-image][jest] ExpoImage spitting console error on Expo 51 while testing HOT 4
- LocalAuthentication.hasHardwareAsync() returns false on iPhone 13 Pro if FaceID permission was canceled HOT 1
- Unable to run on iPhone 8 after updating to Expo 51 HOT 5
- LocalAuthentication.hasHardwareAsync() returns false on iPhone 13 Pro if FaceID permission was canceled
- npx expo lint gives a maximum call stack size exceeded isn't solved yet HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expo.