expo run:ios works fine but eas build --local fails

Hello!

I created a new managed project using expo init and then ran eas build:configure to create a eas.json file, in the development profile I added developmentClient: true and ran expo install expo-dev-client.
I created this project to be as clean as possible.

I also ran npm install -g eas-cli expo-cli to be up to date.

When I run expo run:ios, the ios folder gets created and the build is successful and open the app in my iOS simulator.
I would like to use eas build --profile development -p ios --local --clear-cache to create my artifact and not create any ios or android folder, however, when I run this command, I get the following output:

[RUN_FASTLANE] ▸ ** BUILD FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸ CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target ‘ExpoModulesCore’ from project ‘Pods’)
[RUN_FASTLANE] ▸ PhaseScriptExecution [CP-User]\ Generate\ Specs /var/folders/dk/gkl1xq2x6zj8j7klq6zgtjhw0000gn/T/eas-build-local-nodejs/daa24289-e936-4579-aa91-0527cd539e5c/build/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-95B13C30767F7C874315A77DC78FCB5A.sh (in target ‘FBReactNativeSpec’ from project ‘Pods’)
[RUN_FASTLANE] ▸ (2 failures)
[RUN_FASTLANE] ** BUILD FAILED **
[RUN_FASTLANE]
[RUN_FASTLANE]
[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE] CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target ‘ExpoModulesCore’ from project ‘Pods’)
[RUN_FASTLANE] PhaseScriptExecution [CP-User]\ Generate\ Specs /var/folders/dk/gkl1xq2x6zj8j7klq6zgtjhw0000gn/T/eas-build-local-nodejs/daa24289-e936-4579-aa91-0527cd539e5c/build/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-95B13C30767F7C874315A77DC78FCB5A.sh (in target ‘FBReactNativeSpec’ from project ‘Pods’)
[RUN_FASTLANE] (2 failures)
[RUN_FASTLANE] Exit status: 65

Also, I tried running expo prebuild and building the project in Xcode and it works fine.

eas version’s output:

eas-cli/0.45.1 darwin-x64 node-v16.13.2

Did anyone get the same error? If so, did you manage to find a solution?

Thanks!

hi there! this is a react-native build issue. it can happen in certain conditions depending on how node is configured on your machine. these tips may be helpful reactjs - PhaseScriptExecution [CP-User] error in React Native - Stack Overflow. also see React Native's initial project doesn't run on IOS. · Issue #31249 · facebook/react-native · GitHub. if you are using nvm, i’d start with the suggestions oriented around that.

1 Like

Thanks for the quick reply!
After some research, the problem did indeed come from my node setup and nvm.
For others having the same problem, I completely removed nvm, node and everything node-related from my system. I then re-installed nvm and ran a simple nvm install 16, this solved my build issue.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.