RData load error

Hi,
I’m trying to read in some xz compressed data using the RData package. I have a module with the line

include(“constants.jl”)

Inside constants.jl is the following:

using CodecXz
using RData
const x = RData.load(joinpath(@DIR, “x.rda”), convert=true)

If I include constants.jl from the REPL it works fine. When I run the module however the returned error is:

[ Info: Precompiling SimSpin [ec6baca6-10c1-11ea-19b5-f7da994b81a8]
WARNING: eval into closed module RData:
Expr(:call, :fileio_load, Expr(:parameters, Expr(:…, Base.Iterators.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:convert,), Tuple{Bool}}}(data=(convert=true,), itr=(:convert,)))), FileIO.File{FileIO.DataFormat{:RData}}(filename=“/home/gralton/Dropbox/Personal/SimSpin/src/ProSpect/data/BC03lr.rda”), Expr(:…, ()))
** incremental compilation may be fatally broken for this module **

Error encountered while loading “/home/gralton/Dropbox/Personal/SimSpin/src/ProSpect/data/BC03lr.rda”.

Fatal error:
ERROR: LoadError: LoadError: RData.CodecMissingError: CodecXz package is required to read Xz-compressed RData files. Run Pkg.add(“CodecXz”) to install it. Then in your code call “using CodecXz” before “using RData”.
Stacktrace:
[1] handle_error(::RData.CodecMissingError, ::FileIO.File{FileIO.DataFormat{:RData}}) at /home/gralton/.julia/packages/FileIO/t40j7/src/error_handling.jl:82
[2] handle_exceptions(::Array{Any,1}, ::String) at /home/gralton/.julia/packages/FileIO/t40j7/src/error_handling.jl:77
[3] #load#27(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:convert,),Tuple{Bool}}}, ::typeof(FileIO.load), ::FileIO.File{FileIO.DataFormat{:RData}}) at /home/gralton/.julia/packages/FileIO/t40j7/src/loadsave.jl:193
[4] (::FileIO.var"#kw##load")(::NamedTuple{(:convert,),Tuple{Bool}}, ::typeof(FileIO.load), ::FileIO.File{FileIO.DataFormat{:RData}}) at ./none:0
[5] #load#13(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:convert,),Tuple{Bool}}}, ::typeof(FileIO.load), ::String) at /home/gralton/.julia/packages/FileIO/t40j7/src/loadsave.jl:118
[6] (::FileIO.var"#kw##load")(::NamedTuple{(:convert,),Tuple{Bool}}, ::typeof(FileIO.load), ::String) at ./none:0
[7] top-level scope at /home/gralton/Dropbox/Personal/SimSpin/src/ProSpect/data/constants.jl:38
[8] include at ./boot.jl:328 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1105
[10] include at ./Base.jl:31 [inlined]
[11] include(::String) at /home/gralton/Dropbox/Personal/SimSpin/src/SimSpin.jl:1
[12] top-level scope at /home/gralton/Dropbox/Personal/SimSpin/src/SimSpin.jl:2
[13] include at ./boot.jl:328 [inlined]
[14] include_relative(::Module, ::String) at ./loading.jl:1105
[15] include(::Module, ::String) at ./Base.jl:31
[16] top-level scope at none:2
[17] eval at ./boot.jl:330 [inlined]
[18] eval(::Expr) at ./client.jl:425
[19] top-level scope at ./none:3
in expression starting at /home/gralton/Dropbox/Personal/SimSpin/src/ProSpect/data/constants.jl:38
in expression starting at /home/gralton/Dropbox/Personal/SimSpin/src/SimSpin.jl:2
ERROR: Failed to precompile SimSpin [ec6baca6-10c1-11ea-19b5-f7da994b81a8] to /home/gralton/.julia/compiled/v1.3/SimSpin/pfBH1_YAkvo.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
[3] _require(::Base.PkgId) at ./loading.jl:1024
[4] require(::Base.PkgId) at ./loading.jl:922
[5] require(::Module, ::Symbol) at ./loading.jl:917

Would anyone be able to help me work out what’s wrong?