# Pkg can't find the forked and cloned package I'm working on (but julia can via LOAD\_PATH)

**URL:** <https://discourse.julialang.org/t/pkg-cant-find-the-forked-and-cloned-package-im-working-on-but-julia-can-via-load-path/22688>\
**Category:** General Usage\
**Created:** [April 3, 2019, 11:19am UTC](https://discourse.julialang.org/t/pkg-cant-find-the-forked-and-cloned-package-im-working-on-but-julia-can-via-load-path/22688 "2019-04-03T11:19:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![colintbowers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colintbowers/32/8033_2.png) [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Post date:** [April 3, 2019, 11:19am UTC](https://discourse.julialang.org/t/pkg-cant-find-the-forked-and-cloned-package-im-working-on-but-julia-can-via-load-path/22688/1 "2019-04-03T11:19:51Z")

</div>

Hi all,

I’m getting the following error when trying to use Pkg to test a package:

```julia
(v1.1) pkg> test SomePackage
ERROR: The following package names could not be resolved:
 * SomePackage (not found in project or manifest)
Please specify by known `name=uuid`.

```

In order to get to this point, here is what I did:

1. Forked SomePackage on github
2. Cloned SomePackage to my local machine using `git clone url/to/SomePackage`. I did this into a local directory on my machine `/home/colin/GithubClones`
3. Added `/home/colin/GithubClones` to `LOAD_PATH` in my `startup.jl` file
4. Successfully performed `using SomePackage` and then ran some functions from it
5. In package environment I tried `test package` and got the error message above.

So my conclusion (which may be wrong) is that adding `/home/colin/GithubClones` to `LOAD_PATH` is sufficient if I just want to use the package, but not sufficient if I want to use `Pkg` to do things like `test` the package, or use `resolve` to fix up any changes in Project.toml and Manifest.toml files.

Any idea what I’m doing wrong here, or what I need to be doing?

BTW, the reason I forked and cloned the package instead of using `dev SomePackage` is because I’m not a registered committer on the package, and so I figured it would be better to follow the Github fork-and-branch approach to submitting a PR, and I wasn’t quite sure how to do this while simultaneously using `dev`.

Cheers and thanks,

Colin

---

<div class="post-metadata">

**Author:** ![colintbowers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colintbowers/32/8033_2.png) [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Post date:** [April 4, 2019, 11:03am UTC](https://discourse.julialang.org/t/pkg-cant-find-the-forked-and-cloned-package-im-working-on-but-julia-can-via-load-path/22688/2 "2019-04-04T11:03:30Z")

</div>

I’ve worked it out. For those who are interested:

If you want to use `Pkg` tools, like `test` and `resolve`, the package needs to be part of your overall environment, which isn’t going to happen just by letting Julia know the package is there via `LOAD_PATH`. The package needs to be added via `Pkg` using `add` or `dev`. I wasn’t really sure how to do this, because I wanted to `dev` the forked and cloned package I had locally, not the package registered in METADATA. It’s actually super-simple. `dev` can take a local path as input, so all I needed to do was call `dev /home/colin/pathtoSomePackage` and I was ready to go.

One point of interest: `using Pkg ; Pkg.develop("/home/colin/pathtoSomePackage")` did _not_ work. I had to enter the package environment using `]`, and then `dev /home/colin/pathtoSomePackage` in order to get things working.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [April 4, 2019, 11:17am UTC](https://discourse.julialang.org/t/pkg-cant-find-the-forked-and-cloned-package-im-working-on-but-julia-can-via-load-path/22688/3 "2019-04-04T11:17:29Z")

</div>

> [@colintbowers](#):
>
> `dev` can take a local path as input, so all I needed to do was call `dev /home/colin/pathtoSomePackage` and I was ready to go.

Yea, `dev` is really great for this, and `dev` is a much better way to make julia aware of packages than adding to `LOAD_PATH`.

> [@colintbowers](#):
>
> One point of interest: `using Pkg ; Pkg.develop("/home/colin/pathtoSomePackage")` did _not_ work. I had to enter the package environment using `]` , and then `dev /home/colin/pathtoSomePackage` in order to get things working.

Yea, if you read the docs it says you need

```julia
Pkg.develop(PackageSpec(path = "/home/colin/pathtoSomePackage"))

```

---

<div class="post-metadata">

**Author:** ![colintbowers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colintbowers/32/8033_2.png) [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Post date:** [April 4, 2019, 11:01pm UTC](https://discourse.julialang.org/t/pkg-cant-find-the-forked-and-cloned-package-im-working-on-but-julia-can-via-load-path/22688/4 "2019-04-04T23:01:07Z")

</div>

Ah yes, I just re-read them. I obviously didn’t look closely enough at the examples the first time around.
