# Errors when trying the new package manager (0.7)

**URL:** <https://discourse.julialang.org/t/errors-when-trying-the-new-package-manager-0-7/11123>\
**Category:** General Usage\
**Tags:** pkg\
**Created:** [May 24, 2018, 8:38am UTC](https://discourse.julialang.org/t/errors-when-trying-the-new-package-manager-0-7/11123 "2018-05-24T08:38:00Z")\
**Posts on this page:** 8\
**Page:** 1

<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:** [May 24, 2018, 8:38am UTC](https://discourse.julialang.org/t/errors-when-trying-the-new-package-manager-0-7/11123/1 "2018-05-24T08:38:00Z")

</div>

I’m trying out the new package manager, but get stuck following the docs here: [https://docs.julialang.org/en/latest/stdlib/Pkg.html#Adding-packages-to-the-project-1](https://docs.julialang.org/en/latest/stdlib/Pkg.html#Adding-packages-to-the-project-1)

```julia
julia> import HelloWorld

julia> HelloWorld.greet()
Hello World!
julia> 

(HelloWorld) pkg> add Random
 Resolving package versions...
  Updating `../Project.toml`
  [9a3f8284] + Random 
  Updating `../Manifest.toml`
  [9a3f8284] + Random 

(HelloWorld) pkg> add JSON
ERROR: The following package names could not be resolved:
 * JSON (not found in project, manifest or registry)
Please specify by known `name=uuid`.

```

Similarly on the next step:

```julia
(HelloWorld) pkg> add https://github.com/fredrikekre/ImportMacros.jl                                                                                                     
  Updating git-repo `https://github.com/fredrikekre/ImportMacros.jl`                                                                                                     
┌ Warning: packages will require to have a [Julia]Project.toml file in the future                                                                                        
└ @ Pkg.Types Types.jl:814                                                                                                                                               
[ Info: Assigning UUID 145ac618-5f2d-11e8-1b45-c5aa9d0e379a to ImportMacros                                                                                              
 Resolving package versions...                                                                                                                                           
ERROR: The following package names could not be resolved:                                                                                                                
 * MacroTools (not found in project, manifest or registry)
Please specify by known `name=uuid`.

```

Also the same thing happens when trying to install a package “normally”, i.e. not inside a “project”.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [May 24, 2018, 8:59am UTC](https://discourse.julialang.org/t/errors-when-trying-the-new-package-manager-0-7/11123/2 "2018-05-24T08:59:37Z")

</div>

Something seems strange with your registry. Can you try to remove `.julia/registries` and try again.

This is what I get:

```julia
(v0.7) pkg> add https://github.com/fredrikekre/ImportMacros.jl
  Updating git-repo `https://github.com/fredrikekre/ImportMacros.jl`
┌ Warning: packages will require to have a [Julia]Project.toml file in the future
└ @ Pkg.Types Types.jl:814
[ Info: Assigning UUID 7c456fe6-5f30-11e8-3ace-f50c1f4cee28 to ImportMacros
  Updating registry at `~/.julia/registries/Uncurated`
  Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git`
 Resolving package versions...
Downloaded MacroTools ─ v0.4.0
  Updating `~/.julia/environments/v0.7/Project.toml`
  [7c456fe6] + ImportMacros v0.0.0 # [https://github.com/fredrikekre/ImportMacros.jl]
  Updating `~/.julia/environments/v0.7/Manifest.toml`
  [7c456fe6] + ImportMacros v0.0.0 # [https://github.com/fredrikekre/ImportMacros.jl]
  [1914dd2f] + MacroTools v0.4.0

```

---

<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:** [May 24, 2018, 9:11am UTC](https://discourse.julialang.org/t/errors-when-trying-the-new-package-manager-0-7/11123/3 "2018-05-24T09:11:53Z")

</div>

Yes, I think that was it. After doing a `git pull` in `.julia/registries/Uncurated` it now seems to work. I suspect I had a few month old version of the registries.

I have another one now:

```julia
(v0.7) pkg> status                                                                                                                                                       
    Status `~/.julia/environments/v0.7/Project.toml`                                                                                                                     
  [295af30f] Revise v0.3.0+ [`~/.julia/dev/Revise`]                                                                                                                      
                                                                                                                                                                         
(v0.7) pkg> precompile                                                                                                                                                   
Precompiling project...                                                                                                                                                  
Precompiling Revise [1 of 1]                                                                                                                                             
ERROR: UndefVarError: OldPkg not defined                                                                                                                                 

```

and when I just try to use it:

```julia
julia> using Revise                                                                                                                                                                                                                           
[ Info: Precompiling module Revise                                                                                                                                                                                                            
ERROR: LoadError: ArgumentError: Module Pkg not found in current path.                                                                                                                                                                        
Run `Pkg.add("Pkg")` to install the Pkg package.                                                                                                                                                                                              
Stacktrace:                                                                                                                                                                                                                                   
 [1] _require(::Base.PkgId) at ./loading.jl:949                                                                                                                                                                                               
 [2] require(::Base.PkgId) at ./loading.jl:877                                                                                                                                                                                                
...

```

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [May 24, 2018, 10:02am UTC](https://discourse.julialang.org/t/errors-when-trying-the-new-package-manager-0-7/11123/4 "2018-05-24T10:02:38Z")

</div>

Loading Revise should work now. A new Compat had to be tagged and propagated to the registry.

I’ll look into the precompile problem.

---

<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:** [May 24, 2018, 10:14am UTC](https://discourse.julialang.org/t/errors-when-trying-the-new-package-manager-0-7/11123/5 "2018-05-24T10:14:52Z")

</div>

Ok, now with Compat at 0.65.1 the `using ...` works, but yes the `precompile` still errors. Thanks!

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [May 24, 2018, 11:30am UTC](https://discourse.julialang.org/t/errors-when-trying-the-new-package-manager-0-7/11123/6 "2018-05-24T11:30:02Z")

</div>

[https://github.com/JuliaLang/julia/pull/27246](https://github.com/JuliaLang/julia/pull/27246)

---

<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:** [May 24, 2018, 12:56pm UTC](https://discourse.julialang.org/t/errors-when-trying-the-new-package-manager-0-7/11123/7 "2018-05-24T12:56:52Z")

</div>

That PR works for me, thanks!

---

<div class="post-metadata">

**Author:** ![Alex\_Hiller](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex_hiller/32/6062_2.png) [@Alex\_Hiller](https://discourse.julialang.org/u/Alex_Hiller)\
**Post date:** [October 24, 2018, 12:34am UTC](https://discourse.julialang.org/t/errors-when-trying-the-new-package-manager-0-7/11123/8 "2018-10-24T00:34:36Z")

</div>

Thanks for this, just fixed an issue for me after I had removed and reinstalled Julia 1.0.1.
