expo: [eas] - Unable build application with EAS build
Summary
I have an error when I build an android app on EAS build. My build ID is a276ca34-3dae-45c1-a34e-c6133f30fced
.
> Task :react-native-community_netinfo:checkReleaseManifest
> Task :react-native-community_masked-view:processReleaseManifest
> Task :react-native-gesture-handler:checkReleaseManifest
> Task :react-native-community_netinfo:processReleaseManifest
> Task :react-native-maps:checkReleaseManifest
> Task :app:bundleReleaseJsAndAssets FAILED
Welcome to React Native!
Learn once, write anywhere
Error: The resource `/build/workingdir/build/apps/xxxxxxxxxx/index.js` was not found.
at /build/workingdir/build/node_modules/metro/src/IncrementalBundler.js:157:26
at gotStat (fs.js:1864:21)
at callback (/build/workingdir/build/node_modules/graceful-fs/polyfills.js:299:20)
at FSReqCallback.oncomplete (fs.js:183:21)
> Task :react-native-gesture-handler:processReleaseManifest
> Task :react-native-maps:processReleaseManifest
TL/DR: Other issues when I migrate the project to EAS build
I trying to migrate the current project from SDKv40 to SDKv41 and use EAS build. Because My project is in a mono repo so it has a lot of problems when I build the project.
-
I have an issue with
expo upgrade
when ran it underapps/foo
. Related to a bug of yarn, https://github.com/yarnpkg/yarn/issues/7807, so I have to downgrade yarn to version1.18.0
withyarn policies set-version 1.18.0
to fix the issue. -
My project uses some private packages hosting on Github Package Registry. So, I have to authenticate with packages. Put
.npmrc
in the project root doesn’t work. I have to ready instruction to find the way is adding an scripteas-build-pre-install
into my package.json for update~/.npmrc
. (The guide should help me do it faster).
{
"eas-build-pre-install": "echo \"//npm.pkg.github.com/:_authToken=${NPM_TOKEN}\" >> ~/.npmrc"
}
- My project in the workspace. Yeah, again. EAS complains about modules not found for
expo-constant
,… I checked the symlinks list atbare-expo
but It not enough to resolve the issue. Finally, the list is below; a lot of modules have to symlinks:
{
"expo-yarn-workspaces": {
"symlinks": [
"@unimodules/core",
"@unimodules/react-native-adapter",
"expo-camera",
"expo-constants",
"expo-splash-screen",
"expo-structured-headers",
"expo-updates",
"unimodules-app-loader",
"unimodules-barcode-scanner-interface",
"unimodules-camera-interface",
"unimodules-constants-interface",
"unimodules-face-detector-interface",
"unimodules-file-system-interface",
"unimodules-font-interface",
"unimodules-image-loader-interface",
"unimodules-permissions-interface",
"unimodules-sensors-interface",
"unimodules-task-manager-interface"
]
}
}
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
41.0.0
Environment
EAS BUILD
Reproducible demo or steps to reproduce from a blank project
none,
please DM me to get access my repo
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (22 by maintainers)
Yeah, the first success build
7edb0b49-f66d-4ace-881f-f3fd1d271386
Just added a new secret.
ENTRY_FILE
. 😃))we’re investigating a good fix for the
index.js
issue that you encountered. i’ll also update the documentation to clarify that support for monorepos with managed apps on eas build (wow that’s a lot of words) is still a bit roughour new autolinking implementation won’t require this for expo modules: https://github.com/expo/expo/pull/11593
we need to symlink some packages because in podfile and gradle files some package contents are referred to by relative path, eg: https://github.com/expo/expo/blob/70b640021ae9f7c5df7eddddfe7a0b855548a3ee/templates/expo-template-bare-typescript/ios/Podfile#L1-L3
if you had a normal “bare” project then you might potentially change these paths to point to your monorepo root node_modules rather than symlinking to the project node_modules (although i still prefer symlinking), but these files don’t exist until
prebuild
runs for managed appsi found the problem - in app.config.json you still have “sdkVersion”: “40.0.0”
you can actually just remove this field entirely and we will determine it based on your “expo” package version.
the result of the sdk version being wrong here is that we install the inappropriate versions of various packages, because we base that entirely off of the sdk version. we ended up installing react-native-unimodules 0.12.0 instead of 0.13.2, and the former brought with it expo-permissions@10.0.0
@giautm - i don’t think it’s a bug on our side, no. you can try to reproduce this issue by doing a fresh clone of your repo, running
yarn
, and then runningexpo prebuild
in your project directory. i unfortunately can’t do that exact thing because i don’t have access to your private npm packagesit looks like your dependencies are incorrect for sdk 41:
you should have
expo-permissions@12.0.1
but your project hasexpo-permissions@10.0.0
i suspect other deps are also out of date
can you share the project w/ me on github?
Just update: I pick the wrong certificate distribution type (I picked
ALL
instead ofiOS
). Re-generate new certificates fixed the issue.Thanks @brentvatne, ❤️
can you try running the build locally with the instructions from https://docs.expo.io/build-reference/local-builds/ and see if that helps to understand the source of the issue?