# Why my package work locally but not with \]add

**URL:** https://discourse.julialang.org/t/why-my-package-work-locally-but-not-with-add/124099
**Category:** General Usage
**Tags:** package
**Created:** [December 22, 2024, 5:49pm UTC](https://discourse.julialang.org/t/why-my-package-work-locally-but-not-with-add/124099 "2024-12-22T17:49:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fdekerme](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fdekerme/32/43574_2.png) [@fdekerme](https://discourse.julialang.org/u/fdekerme)
#### Post date: [December 22, 2024, 5:49pm UTC](https://discourse.julialang.org/t/why-my-package-work-locally-but-not-with-add/124099/1 "2024-12-22T17:49:30Z")

</div>

Hello 😃.  
I published few month ago my first small package DICOMTree.jl, which dispatches the `Tree` function of Term.jl for medical DICOM data.  
When I run the package locally on my machine (`git fork, cd DICOMtree, ]instantiate then Tree(...)`), everything works fine.

But when I install the package with `]add DICOMTree` and use it (`Tree(...)`), it returns the following error:

```julia
ERROR: MethodError: no method matching print_tree(::typeof(Term.Trees.print_node), ::typeof(Term.Trees.print_key), ::IOBuffer, ::Dict{…}; charset::AbstractTrees.TreeCharSet, printkeys::Bool, prefix::String, with_keys::Bool, maxdepth::Int64)
This error has been manually thrown, explicitly, so the method may exist but be intentionally marked as unimplemented.

Closest candidates are:
  print_tree(::Function, ::Function, ::IO, ::Any; maxdepth, indicate_truncation, charset, printkeys, depth, prefix, printnode_kw) got unsupported keyword argument "with_keys"
   @ AbstractTrees ~/.julia/packages/AbstractTrees/Ftf8W/src/printing.jl:194
  print_tree(::Function, ::IO, ::Any; kw...)
   @ AbstractTrees ~/.julia/packages/AbstractTrees/Ftf8W/src/printing.jl:276
  print_tree(::Any; kw...)
   @ AbstractTrees ~/.julia/packages/AbstractTrees/Ftf8W/src/printing.jl:278
  ...

```

Also (maybe it’s related), in VSCode I have the `Tree` functions definition highlighted in blue with the warning _`"An imported function has been extended without using module defined type arguments.Julia(TypePiracy)"`_. I do not really understand what is the problem.

Thank you in advance for your answers!  
fdekerm

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [December 22, 2024, 6:20pm UTC](https://discourse.julialang.org/t/why-my-package-work-locally-but-not-with-add/124099/2 "2024-12-22T18:20:51Z")

</div>

I can install your package fine, even though there seam to be no tests.

```julia
julia> using DICOMTree

julia> Tree(...)
ERROR: ParseError:
# Error @ REPL[4]:1:6
Tree(...)
# └─┘ ── invalid identifier
Stacktrace:
 [1] top-level scope
   @ none:1

```

Can you share a complete example with the commands that work locally but fails otherwise? Perhaps also share a dcm file, if that is needed?
