Hive Hive
Sign in

tuist xcodebuild build fails with “unable to find module dependency”

GitHub issue · Open

Metadata
Source
tuist/tuist #8560
Updated
Jun 11, 2026
Domains
CLI
Details

What happened?

I have an example project here: https://github.com/lilidotshi/TuistTestExclusionExample/tree/lshi/ios-bad-build

tuist xcodebuild build seems to be struggling (even when suppling -scheme). It’s failing to find module dependencies.

How do we reproduce it?

Steps to repro:

DL the branch, then run tuist install; tuist generate; tuist xcodebuild build.

Error log

This command fails with ❌ /Developer/TuistRunExample/TuistRunExample/Module/Sources/Test.swift:1:8: Unable to find module dependency: 'Alamofire'

Conversely, tuist build has no issues building.

macOS version

26.0.1

Tuist version

4.97.2

Xcode version

26.0.1

Comments
L
linear[bot] Nov 1, 2025
D
dosubot[bot] Nov 1, 2025

The reason tuist build works but tuist xcodebuild build fails to find module dependencies like Alamofire is due to how these commands handle project generation and scheme configuration.

tuist build regenerates or reloads the project graph and applies project mappers—including the one that auto-generates schemes for your targets—every time you run it. This ensures that all schemes and dependency configurations are up-to-date, so dependencies like Alamofire are correctly resolved.

On the other hand, tuist xcodebuild build is just a thin wrapper around xcodebuild. It does not regenerate the project or update schemes; it assumes the Xcode project and schemes are already generated and current. If the schemes are missing or stale, xcodebuild may fail to resolve module dependencies, resulting in errors like “unable to find module dependency: ‘Alamofire’” source.

To fix this, always run tuist generate (or tuist build) before using tuist xcodebuild build, especially after changing dependencies or targets. This ensures the generated Xcode project and schemes are up-to-date and all dependencies are correctly configured.

If you still see issues, check that your schemes include all necessary targets and dependencies, or try updating to the latest Tuist version, as some dependency and platform-related bugs have been fixed in recent releases source.

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about tuist Share Dosu with your team

L
lilidotshi Nov 1, 2025

@dosu if you see my repro steps tuist generate always gets run before.

L
lilidotshi Nov 1, 2025

Feedback for @dosu as well, running tuist build before running tuist xcodebuild build doesn’t make any sense.

D
dosubot[bot] Nov 1, 2025

You’re absolutely right—there’s no need to run tuist build before tuist xcodebuild build. They’re separate commands with different purposes. tuist xcodebuild build is just a thin wrapper around xcodebuild and doesn’t regenerate the project or schemes; it assumes everything is already up-to-date, just like running xcodebuild directly (source). The issue you’re seeing is not because you skipped tuist build, but rather due to how tuist xcodebuild build handles dependency configuration and scheme generation compared to tuist build (source). If you already run tuist generate before, that’s the correct workflow.

To reply, just mention @dosu.


Share context across your team and agents. Try Dosu.

Leave Feedback Learn about tuist with Dosu Add Dosu to your team

L
lilidotshi Nov 3, 2025

@pepicrft @fortmarek I know there’s been discussion about deprecating the tuist build command here, do you think this is a blocker?

I
IsaiahJTurner Dec 30, 2025

Just hit this as well after following the advice from the deprecation thread. Should that thread be updated?