# Doubt in using the Reexport.jl command

**URL:** <https://discourse.julialang.org/t/doubt-in-using-the-reexport-jl-command/61085>\
**Category:** New to Julia\
**Tags:** question, package\
**Created:** [May 13, 2021, 2:02pm UTC](https://discourse.julialang.org/t/doubt-in-using-the-reexport-jl-command/61085 "2021-05-13T14:02:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaquelSantos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raquelsantos/32/3668_2.png) [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Post date:** [May 13, 2021, 2:02pm UTC](https://discourse.julialang.org/t/doubt-in-using-the-reexport-jl-command/61085/1 "2021-05-13T14:02:13Z")

</div>

I have a model and I would like to use it in two environments, one for the code base and the other for exporting and expanding the methods.  
But I don’t know how to use the command. Can anybody help me?  
Thanks 😃

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [May 13, 2021, 2:17pm UTC](https://discourse.julialang.org/t/doubt-in-using-the-reexport-jl-command/61085/2 "2021-05-13T14:17:13Z")

</div>

You just write

```julia
using Reexport

@reexport using MyModelCode

```

and then you have access to everything `MyModelCode` exports.

---

<div class="post-metadata">

**Author:** ![RaquelSantos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raquelsantos/32/3668_2.png) [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Post date:** [May 13, 2021, 3:33pm UTC](https://discourse.julialang.org/t/doubt-in-using-the-reexport-jl-command/61085/3 "2021-05-13T15:33:59Z")

</div>

```julia
using Reexport
@reexport using ModelD
ArgumentError: Package ModelD not found in current path:
- Run `import Pkg; Pkg.add ("ModelD") `to install the ModelD package.

ERROR: The following package names could not be resolved:
  * ModelD (not found in project, manifest or registry)

```

I can’t use the command, although `ModelD` is not a package, even so I tried to add it and it didn’t work.

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [May 13, 2021, 3:54pm UTC](https://discourse.julialang.org/t/doubt-in-using-the-reexport-jl-command/61085/4 "2021-05-13T15:54:47Z")

</div>

You need to make sure your package “knows about” `ModelD`, so you should first run `] dev path/to/ModelD/`, or better yet, host the code for `ModelD` on github and `] add` the URL.

---

<div class="post-metadata">

**Author:** ![RaquelSantos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raquelsantos/32/3668_2.png) [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Post date:** [May 17, 2021, 3:19pm UTC](https://discourse.julialang.org/t/doubt-in-using-the-reexport-jl-command/61085/5 "2021-05-17T15:19:24Z")

</div>

Hi  
I followed your instructions and unfortunately it didn’t work. I don’t know if I’m doing something wrong, I created a new project called `Testando.jl` and there I did

```julia
using Reexport
@reexport using ModelD

(@ JuliaPro_v1.5.2-1) pkg> add https://github.com/Raqueldcs/Raquel/blob/main/ModelD.jl
     Cloning git-repo `https: // github.com / Raqueldcs / Raquel / blob / main / ModelD.jl`
ERROR: failed to clone from https://github.com/Raqueldcs/Raquel/blob/main/ModelD.jl, error: GitError (Code: ERROR, Class: Net, request failed with status code: 404)

```

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [May 17, 2021, 3:21pm UTC](https://discourse.julialang.org/t/doubt-in-using-the-reexport-jl-command/61085/6 "2021-05-17T15:21:19Z")

</div>

You need to add the Repo url, which needs to be in the “standard” package file structure.

It’s a lot to keep in mind when organizing your code. I recommend reading the docs fully [here](https://pkgdocs.julialang.org/v1/creating-packages/) and following the instructions very carefully.
