---
title: Missing module on known path from a dependency (MissingModuleOnKnownPaths)
framework: swift-compiler
role: article
role_heading: Article
path: swift-compiler/documentation/diagnostics/missing-module-on-known-paths
---

# Missing module on known path from a dependency (MissingModuleOnKnownPaths)

Notes related to information about a missing module dependency.

## Overview

Overview This diagnostic group covers notes related to displaying information about a missing module dependency which the compiler is able to locate as present on a search path found in a loaded Swift binary module, but which is not specified to the current compilation. As one example of a potential missing module diagnostic, suppose an imported module Foo is resolved to a Swift binary module which itself depends on module Bar and was built with an additional search path where Bar is located, and suppose that the client which imports Foo does not specify this search path: import Foo The Swift compiler would emit a module-not-found error and a note to inform the user of the missing search path containing Bar which was found serialized in Foo’s binary Swift module: error: Compilation search paths unable to resolve module dependency: 'Bar' [#MissingModuleOnKnownPaths] note: 'Bar' can be found using a search path that was specified when building module 'Foo' ('<Search Path>'). This search path was not specified on the current compilation. Some prior versions of the Swift compiler erroneously inherited search paths from loaded binary Swift modules and used them to resolve other, subsequently-encountered module dependencies. All search paths required to resolve direct and transitive module dependencies must be explicitly specified on the compiler invocation which will encounter these dependencies.

## See Also

- [@dynamicCallable implementation requirements (DynamicCallable)](swift-compiler/documentation/diagnostics/dynamic-callable-requirements.md)
- [Add @preconcurrency import (AddPreconcurrencyImport)](swift-compiler/documentation/diagnostics/add-preconcurrency-import.md)
- [Always enabled availability domains (AlwaysAvailableDomain)](swift-compiler/documentation/diagnostics/always-available-domain.md)
- [Argument matching for trailing closures (TrailingClosureMatching)](swift-compiler/documentation/diagnostics/trailing-closure-matching.md)
- [Calling a mutating async actor-isolated method (ActorIsolatedMutatingAsync)](swift-compiler/documentation/diagnostics/actor-isolated-mutating-async.md)
- [Calling an actor-isolated method from a synchronous nonisolated context (ActorIsolatedCall)](swift-compiler/documentation/diagnostics/actor-isolated-call.md)
- [Captures in a `@Sendable` closure (SendableClosureCaptures)](swift-compiler/documentation/diagnostics/sendable-closure-captures.md)
- [Compilation caching (CompilationCaching)](swift-compiler/documentation/diagnostics/compilation-caching.md)
- [Conforming to `StringInterpolationProtocol` (StringInterpolationConformance)](swift-compiler/documentation/diagnostics/string-interpolation-conformance.md)
- [Conversion from `@isolated(any)` function type to synchronous function type (ConversionFromIsolatedAnyToSynchronous)](swift-compiler/documentation/diagnostics/conversion-from-isolated-any-to-synchronous.md)
- [Cross-isolation data race (RegionIsolationCrossIsolationDataRace)](swift-compiler/documentation/diagnostics/region-isolation-cross-isolation-data-race.md)
- [Deprecated declaration warnings (DeprecatedDeclaration)](swift-compiler/documentation/diagnostics/deprecated-declaration.md)
- [Deprecated implementation-only imports (ImplementationOnlyDeprecated)](swift-compiler/documentation/diagnostics/implementation-only-deprecated.md)
- [Dynamic exclusivity (DynamicExclusivity)](swift-compiler/documentation/diagnostics/dynamic-exclusivity.md)
- [Embedded Swift language restrictions (EmbeddedRestrictions)](swift-compiler/documentation/diagnostics/embedded-restrictions.md)
