# Problem with referencing modules

**URL:** <https://discourse.julialang.org/t/problem-with-referencing-modules/100916>\
**Category:** New to Julia\
**Created:** [June 27, 2023, 9:36pm UTC](https://discourse.julialang.org/t/problem-with-referencing-modules/100916 "2023-06-27T21:36:46Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [June 28, 2023, 2:44pm UTC](https://discourse.julialang.org/t/problem-with-referencing-modules/100916/11 "2023-06-28T14:44:19Z")

</div>

One issue that is apparent from the given warnings is that you have multiple conflicting copies of identical modules. You could probably fix this by adopting the practice of not `include`ing files from within your modules. If you’re deveping a package, then only use `include` in the top-level file/module.

Keep in mind that `include` literally _includes_ the contents of a file within another file.

> [@jlhouchin](#):
>
> @nsajko requested that I run this in the REPL to check for syntactic errors.  
> This what I got.

Try `include`ing _each_ of your modules **individually** , from a fresh REPL session.

EDIT: in case an example would be helpful, see my package [here](https://gitlab.com/nsajko/FindMinimaxPolynomial.jl). The top-level file, with the top-level module, is the only place with any `include`s:

> <https://gitlab.com/nsajko/FindMinimaxPolynomial.jl/-/blob/da912685544cdd6c8829ba502235b34d59826469/src/FindMinimaxPolynomial.jl#L2-L20>

The sub-modules then use other modules like so:

> <https://gitlab.com/nsajko/FindMinimaxPolynomial.jl/-/blob/da912685544cdd6c8829ba502235b34d59826469/src/ApproximateInfinityNorm.jl#L3-L10>

---

_[View the full topic](https://discourse.julialang.org/t/problem-with-referencing-modules/100916)._
