# Error after update

**URL:** <https://discourse.julialang.org/t/error-after-update/129700>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [June 6, 2025, 1:02pm UTC](https://discourse.julialang.org/t/error-after-update/129700 "2025-06-06T13:02:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![drarnau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drarnau/32/4476_2.png) [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Post date:** [June 6, 2025, 1:02pm UTC](https://discourse.julialang.org/t/error-after-update/129700/1 "2025-06-06T13:02:05Z")

</div>

I have an old project which uses Julia 1.7.1. I just did:

```shell
] activate .

```

and:

```julia
update

```

Then:

```julia
using MyPackage

```

I get the following error:

```julia
ERROR: LoadError: UndefVarError: pkgversion not defined

```

Any ideas about what’s going on? What to do?

Thank you!

---

<div class="post-metadata">

**Author:** ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Post date:** [June 6, 2025, 1:06pm UTC](https://discourse.julialang.org/t/error-after-update/129700/2 "2025-06-06T13:06:23Z")

</div>

- While in Julia repl type `]` then you you enter pkg mode. Now type `st` and hit Enter button. Tell us output of `(@v1.7) pkg> st`

- Also post here full error that you are getting.

---

<div class="post-metadata">

**Author:** ![drarnau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drarnau/32/4476_2.png) [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Post date:** [June 6, 2025, 1:08pm UTC](https://discourse.julialang.org/t/error-after-update/129700/3 "2025-06-06T13:08:16Z")

</div>

```julia
Project MyPackage v0.1.0
      Status `~/Documents/MyPackage/Project.toml`
  [fbb218c0] BSON v0.3.9
  [6e4b80f9] BenchmarkTools v1.6.0
  [e2ed5e7c] Bijections v0.2.2
  [336ed68f] CSV v0.10.15
  [a93c6f00] DataFrames v1.7.0
  [31c24e10] Distributions v0.25.118
  [e30172f5] Documenter v1.11.4
  [35a29f4d] DocumenterTools v0.1.20
  [a98d9a8b] Interpolations v0.15.1
  [4138dd39] JLD v0.13.5
  [16fef848] LiveServer v1.5.0
  [e1d29d7a] Missings v1.2.0
  [3933049c] MultistartOptimization v0.2.3
  [76087f3c] NLopt v1.1.4
  [91a5bcdd] Plots v1.40.13
  [fcd29c91] QuantEcon v0.16.6
  [f2b01f46] Roots v2.2.7
  [2913bbd2] StatsBase v0.34.4
  [f3b207a7] StatsPlots v0.15.7
  [3a884ed6] UnPack v1.0.2
  [9a3f8284] Random
  [10745b16] Statistics

```

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [June 6, 2025, 1:10pm UTC](https://discourse.julialang.org/t/error-after-update/129700/4 "2025-06-06T13:10:41Z")

</div>

The problem is that `pkgversion` does not exist in Julia 1.7:

```julia
C:\> julia +1.9 -q --startup-file=no 1 06/06/2025 02:08:37 PM
julia> import Pkg; pkgversion
pkgversion (generic function with 1 method)

julia> exit()
C:\> julia +1.8 -q --startup-file=no
julia> import Pkg; pkgversion
ERROR: UndefVarError: pkgversion not defined

```

so you must have a package (version) which declares compatibility with Julia 1.7 while using functionality that was only introduced in 1.9.

---

<div class="post-metadata">

**Author:** ![drarnau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drarnau/32/4476_2.png) [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Post date:** [June 6, 2025, 1:12pm UTC](https://discourse.julialang.org/t/error-after-update/129700/5 "2025-06-06T13:12:34Z")

</div>

Thanks, how can I find out which package does that?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [June 6, 2025, 1:13pm UTC](https://discourse.julialang.org/t/error-after-update/129700/6 "2025-06-06T13:13:33Z")

</div>

The stacktrace should tell you?

---

<div class="post-metadata">

**Author:** ![drarnau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drarnau/32/4476_2.png) [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Post date:** [June 6, 2025, 1:15pm UTC](https://discourse.julialang.org/t/error-after-update/129700/7 "2025-06-06T13:15:46Z")

</div>

It mentions several packages but the only one I use in my package directly is `QuantEcon` I guess this calls other packages, is that possible?

---

<div class="post-metadata">

**Author:** ![drarnau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drarnau/32/4476_2.png) [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Post date:** [June 6, 2025, 1:18pm UTC](https://discourse.julialang.org/t/error-after-update/129700/8 "2025-06-06T13:18:33Z")

</div>

Which options do I have? Can I “un-update” a package? Should I update Julia?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [June 6, 2025, 1:20pm UTC](https://discourse.julialang.org/t/error-after-update/129700/9 "2025-06-06T13:20:53Z")

</div>

Yes, you can `undo` in package mode to undo the update.

You can also update Julia, there isn’t really a reason to stay on 1.7 unless you want to stick with the exact package configuration and setup you had when you originally wrote your code for reproduciblity reasons, but given you updated the packages that doesn’t seem to be the case.

FWIW `QuantEcon` v0.16.6 works fine on Julia 1.7, so your error is likely coming from elsewhere.
