# Cannot include Neptune.jl

**URL:** <https://discourse.julialang.org/t/cannot-include-neptune-jl/59185>\
**Category:** General Usage\
**Created:** [April 13, 2021, 11:38am UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185 "2021-04-13T11:38:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![emmettgb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/emmettgb/32/20393_2.png) [@emmettgb](https://discourse.julialang.org/u/emmettgb)\
**Post date:** [April 13, 2021, 11:38am UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/1 "2021-04-13T11:38:10Z")

</div>

I have been unable to use the include method on Neptune.jl exclusively, below is my terminal session.

```julia
emmett@y700:~$ cd dev
emmett@y700:~/dev$ julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.5.3 (2020-11-09)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(@v1.5) pkg> activate Neptune.jl
 Activating environment at `~/dev/Neptune.jl/Project.toml`

julia> cd("Neptune.jl/src")

julia> pwd()
"/home/emmett/dev/Neptune.jl/src"

julia> include("Neptune.jl")
ERROR: LoadError: MethodError: no method matching dirname(::Nothing)
Closest candidates are:
  dirname(::AbstractString) at path.jl:161
Stacktrace:
 [1] project_relative_path(::String) at /home/emmett/dev/Neptune.jl/src/Neptune.jl:15
 [2] top-level scope at /home/emmett/dev/Neptune.jl/src/Neptune.jl:17
 [3] include(::String) at ./client.jl:457
 [4] top-level scope at REPL[4]:1
in expression starting at /home/emmett/dev/Neptune.jl/src/Neptune.jl:17

julia> include(dirname("Neptune.jl"))
ERROR: could not open file /home/emmett/dev/Neptune.jl/src/
Stacktrace:
 [1] include(::String) at ./client.jl:457
 [2] top-level scope at REPL[5]:1

julia> cd("..")

julia> pwd()
"/home/emmett/dev/Neptune.jl"

julia> cd("..")

julia> cd("SuperFrames.jl/src")

julia> pwd()
"/home/emmett/dev/SuperFrames.jl/src"

julia> include("SuperFrames.jl")
Main.SuperFrames

julia> println("What??")
What??

```

---

<div class="post-metadata">

**Author:** ![briochemc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/briochemc/32/4209_2.png) [@briochemc](https://discourse.julialang.org/u/briochemc)\
**Post date:** [April 13, 2021, 11:42am UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/2 "2021-04-13T11:42:28Z")

</div>

You’re creating a new folder. You need to remove the `.jl` in your `activate`.

EDIT: Oh maybe I got this wrong…

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [April 13, 2021, 11:42am UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/3 "2021-04-13T11:42:37Z")

</div>

What are the filenames in your folder

```julia
Neptune.jl/src

```

perhaps the source file is `neptune.jl` with a lowercase n.

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [April 13, 2021, 11:45am UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/4 "2021-04-13T11:45:07Z")

</div>

No, it’s a good point

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [April 13, 2021, 11:47am UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/5 "2021-04-13T11:47:45Z")

</div>

What are you trying to do? Why not just do:

```julia
] activate Neptune
using Neptune

```

?

The error you see is from executing [Neptune.jl/Neptune.jl at 5f95cb444b02155d2dbdbd76e4f245896e68da20 · compleathorseplayer/Neptune.jl · GitHub](https://github.com/compleathorseplayer/Neptune.jl/blob/5f95cb444b02155d2dbdbd76e4f245896e68da20/src/Neptune.jl#L15), as apparently `pathof` a module loaded with `include` is not defined, hence returning `nothing`.

---

<div class="post-metadata">

**Author:** ![briochemc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/briochemc/32/4209_2.png) [@briochemc](https://discourse.julialang.org/u/briochemc)\
**Post date:** [April 13, 2021, 11:50am UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/6 "2021-04-13T11:50:44Z")

</div>

It’s just that this does not create a folder with a `src/` for me, and so I can’t reproduce the error so I’m not sure… More likely that others, like @mauro3 above, know what’s going on 🙂

---

<div class="post-metadata">

**Author:** ![emmettgb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/emmettgb/32/20393_2.png) [@emmettgb](https://discourse.julialang.org/u/emmettgb)\
**Post date:** [April 13, 2021, 1:52pm UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/7 "2021-04-13T13:52:27Z")

</div>

You could always clone the repository  
git clone [GitHub - emmettgb/Neptune.jl: Simple (Pluto-based) non-reactive notebooks for Julia](https://github.com/emmettgb/Neptune.jl)

I have been doing so through Pkg, adding and updating – not too bad, but constant commits with any alterations…

---

<div class="post-metadata">

**Author:** ![emmettgb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/emmettgb/32/20393_2.png) [@emmettgb](https://discourse.julialang.org/u/emmettgb)\
**Post date:** [April 13, 2021, 2:06pm UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/8 "2021-04-13T14:06:44Z")

</div>

Not it, I am of course lsing around, etc

---

<div class="post-metadata">

**Author:** ![briochemc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/briochemc/32/4209_2.png) [@briochemc](https://discourse.julialang.org/u/briochemc)\
**Post date:** [April 14, 2021, 1:00am UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/9 "2021-04-14T01:00:20Z")

</div>

Have you tried without the `.jl` as suggested by @mauro3 and myself? While the packages have the `.jl` extension on GitHub, I believe all your local package repositories in `dev/` should appear without the `.jl` extension if you `add`ed or `dev`ed them.

---

<div class="post-metadata">

**Author:** ![emmettgb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/emmettgb/32/20393_2.png) [@emmettgb](https://discourse.julialang.org/u/emmettgb)\
**Post date:** [April 14, 2021, 5:26am UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/10 "2021-04-14T05:26:50Z")

</div>

Yes, but the environment is not so much what I am worried about, as status() and update() seem to have worked fine. The include() call is where I am getting the error, it is like the src/Neptune.jl file does not exist. Calling src/Neptune as well yields no difference as wekk of course. It is almost as if Julia is unaware that the file exists.

---

<div class="post-metadata">

**Author:** ![briochemc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/briochemc/32/4209_2.png) [@briochemc](https://discourse.julialang.org/u/briochemc)\
**Post date:** [April 14, 2021, 6:53am UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/11 "2021-04-14T06:53:10Z")

</div>

I mean instead of `cd`ing into `dev/Neptune.jl`, have you tried `cd`ing into the correct `dev/Neptune`?

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [April 14, 2021, 7:50am UTC](https://discourse.julialang.org/t/cannot-include-neptune-jl/59185/12 "2021-04-14T07:50:05Z")

</div>

> [@emmettgb](#):
>
> The include() call is where I am getting the error, it is like the src/Neptune.jl file does not exist.

Have you read my post above? It finds the file but then errors in the line linked to above. Apparently it is not made to be `included` but only loaded by `using` or `import`. Alternatively, if you must `include` you will need to update that line of code.
