# Trying to write a package and cannot update it

**URL:** <https://discourse.julialang.org/t/trying-to-write-a-package-and-cannot-update-it/83821>\
**Category:** Package Management\
**Tags:** question, package\
**Created:** [July 6, 2022, 7:15am UTC](https://discourse.julialang.org/t/trying-to-write-a-package-and-cannot-update-it/83821 "2022-07-06T07:15:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![roeya](https://avatars.discourse-cdn.com/v4/letter/r/ecb155/32.png) [@roeya](https://discourse.julialang.org/u/roeya)\
**Post date:** [July 6, 2022, 7:15am UTC](https://discourse.julialang.org/t/trying-to-write-a-package-and-cannot-update-it/83821/1 "2022-07-06T07:15:31Z")

</div>

Hi,

I have a created simple package, I do not want it to use github.

So I have created it, and used Pkg dev function to add it to the project  
everything was fine till I added a new function to the package.

I have updated the version number in the package toml file.  
and used the dev to get it in my main project and it seems fine:

dev .\TitleProcess  
Resolving package versions…  
Updating `C:\Projects\julia\Project.toml`  
[f55b3f19] ~ TitleProcess v0.2.2 `TitleProcess` ⇒ v0.2.3 `TitleProcess`  
Updating `C:\Projects\julia\Manifest.toml`  
[f55b3f19] ~ TitleProcess v0.2.2 `TitleProcess` ⇒ v0.2.3 `TitleProcess`

however I cannot use the new function added - I get  
ERROR: UndefVarError: cleaner not defined

The odd thing is that if I try to debug the script everything works and the “missing” function is found and running fine

Any clue what went wrong ?

---

<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:** [July 6, 2022, 7:40am UTC](https://discourse.julialang.org/t/trying-to-write-a-package-and-cannot-update-it/83821/2 "2022-07-06T07:40:06Z")

</div>

It doesn’t look like you are tracking a path, if you use `Pkg.develop` you should see the path to your project in the status output. Perhaps you used `Pkg.add` instead (which checks out the latest commit)?

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [July 7, 2022, 10:18pm UTC](https://discourse.julialang.org/t/trying-to-write-a-package-and-cannot-update-it/83821/3 "2022-07-07T22:18:31Z")

</div>

Is it possible that your didn’t `export` the function from the module? Easiest way to check is to try `TitleProcess.function_name()`. (I ask because I have confused myself this way multiple times)

---

<div class="post-metadata">

**Author:** ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Post date:** [July 8, 2022, 5:48am UTC](https://discourse.julialang.org/t/trying-to-write-a-package-and-cannot-update-it/83821/4 "2022-07-08T05:48:27Z")

</div>

And in case the error persists, can you post the code for `TitleProcess`?
