# Error with modules sharing types

**URL:** <https://discourse.julialang.org/t/error-with-modules-sharing-types/37119>\
**Category:** New to Julia\
**Created:** [April 6, 2020, 5:03pm UTC](https://discourse.julialang.org/t/error-with-modules-sharing-types/37119 "2020-04-06T17:03:06Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [April 6, 2020, 7:12pm UTC](https://discourse.julialang.org/t/error-with-modules-sharing-types/37119/4 "2020-04-06T19:12:41Z")

</div>

Yeah, you definitely don’t want to do that–you are creating two completely unrelated modules called `M1` by calling `include()` twice. If you’re familiar with C++, this would be like including the same header outside of _and_ inside of a namespace.

You don’t need to use projects for this (although projects are incredibly useful). Just add the current directory (“.”) to your `LOAD_PATH` and get rid of all your `include()` calls:

```julia
julia> push!(LOAD_PATH, ".")
4-element Array{String,1}:
 "@"
 "@v#.#"
 "@stdlib"
 "."

julia> using M1
[Info: Precompiling M1 [top-level]

```

---

_[View the full topic](https://discourse.julialang.org/t/error-with-modules-sharing-types/37119)._
