Closed garrettg123 closed 1 year ago
env: python: No such file or directory
sharp does not provide prebuilds for m1, so it tries to build from the source. Python should be installed on M1, but image you are using is on macos version that already removed python2, so you might try on the older one.
Or if you do not use sharp in mobile app, you can set up your project in a way that does not install dependencies. e.g you can keep everything in the same repo without using workspaces.
Hey I'm having exactly the same issue! I use a workspace and another project in the workspace uses sharp.
@wkozyra95 Forgive me because I'm not very good at configuring this tooling, could you be a bit more explicit on how to change the base image for the eas build ? Is there a way to still use workspaces but to tell expo that it should only install dependencies for the mobile app? (not for every other project in the workspace?)
@mikealche did you figure out a solve for this issue? Facing a similar issue now
ey oh ey oh, if you're in a monorepo setup and some other package is using sharp this might be hapenning. Expo detects yarn workspaces and runs a yarn install
, which builds every damn dependency(!) and sharp is a p in the a to build cuz of c++ whatever it wants to use.
I guess you can
I remember mr. @byCedric to be the monorepo expert so he might know the real solution to this, which is how do I tell expo to only build dependencies that my expo project uses instead of whole damn dependencies of the monorepo.
cheers
Is there any solution to this? It doesn't seem to happen on every build, but it wastes a lot of builds just trying to figure out the pattern, if there is one.
Previously we never had any trouble with including Sharp in our monorepo.
Edit: It seems possible setting SHARP_IGNORE_GLOBAL_LIBVIPS: 1
in env may be a remedy. I'll try to remember to report back.
Add following script in package.json
"scripts": {
"eas-build-pre-install": "brew remove vips",
// ...rest
}
Add following script in
package.json
"scripts": { "eas-build-pre-install": "brew remove vips", // ...rest }
for conditional based on platform (ignores step if android)
"scrips": {
"eas-build-pre-install": "if [[ \"$EAS_BUILD_PLATFORM\" == \"ios\" ]]; then brew remove vips; fi",
}
Build/Submit details page URL
https://expo.dev/accounts/garrettg/projects/blogcast/builds/17a58368-c5a0-415a-9e98-e56c389b06c6
Summary
I am trying to build my Expo app for iOS using the
eas build --platform ios
command, but I am encountering an error related to the "sharp" package. The error message I receive is:Managed or bare?
bare
Environment
expo-env-info 1.0.5 environment info: System: OS: macOS 13.2 Shell: 3.0.2 - /usr/local/bin/fish Binaries: Node: 16.18.1 - /usr/local/bin/node Yarn: 1.22.5 - ~/.yarn/bin/yarn npm: 9.4.0 - /usr/local/bin/npm Watchman: 2023.02.13.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: API Levels: 30, 31, 32, 33 Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0, 33.0.0, 33.0.1 System Images: android-30 | Google Play Intel x86 Atom, android-33 | Google APIs ARM 64 v8a, android-33 | Google APIs Intel x86 Atom_64 IDEs: Android Studio: 2022.1 AI-221.6008.13.2211.9514443 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Expo Workflow: bare
Error output
No response
Reproducible demo or steps to reproduce from a blank project
sharp
module installed in a separateyarn workspace
packageeas build
and choose to use the new m1 build