# Local modules

**URL:** <https://discourse.julialang.org/t/local-modules/88117>\
**Category:** General Usage\
**Tags:** question, module\
**Created:** [October 2, 2022, 10:18am UTC](https://discourse.julialang.org/t/local-modules/88117 "2022-10-02T10:18:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZuiDet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zuidet/32/43156_2.png) [@ZuiDet](https://discourse.julialang.org/u/ZuiDet)\
**Post date:** [October 2, 2022, 10:18am UTC](https://discourse.julialang.org/t/local-modules/88117/1 "2022-10-02T10:18:12Z")

</div>

How to work with multiple local linked modules? I have read through the similar topics in discourse but didn’t find a suitable solution.

I have one main module which uses 2 modules: ModA and helper.  
Module modA also uses module helper.

Main.jl

```julia
include("helper.jl")
using .helper

include("ModA.jl")

mean_vector = [0, 1]
Aexp = expansion(mean_vector)
ModA.solve(Aexp)

```

ModA.jl

```julia
module ModA
export solve

include("helper.jl")
using .helper

function solve(A::expansion)
    println(A.mean)
end

end

```

helper.jl

```julia
module helper
export expansion

struct expansion
    mean::Vector{Float64}
end

end

```

When calling Main.jl I get the following error:  
MethodError: no method matching solve(::expansion)  
Closest candidates are:  
solve(::Main.ModA.helper.expansion)

How can I solve the error?

---

<div class="post-metadata">

**Author:** ![t-bltg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/t-bltg/32/25526_2.png) [@t-bltg](https://discourse.julialang.org/u/t-bltg)\
**Post date:** [October 2, 2022, 10:22am UTC](https://discourse.julialang.org/t/local-modules/88117/2 "2022-10-02T10:22:38Z")

</div>

The following works:

```julia
module ModA
export solve

using ..helper

function solve(A::expansion)
    println(A.mean)
end

end

```

Docs: [Modules · The Julia Language](https://docs.julialang.org/en/v1/manual/modules/#Submodules-and-relative-paths)
