# Code runs fine on Juno and Intellij-Idea but crashes on VSCode. ArgumentError: Package OffsetArrays does not have Adapt in its dependencies

**URL:** <https://discourse.julialang.org/t/code-runs-fine-on-juno-and-intellij-idea-but-crashes-on-vscode-argumenterror-package-offsetarrays-does-not-have-adapt-in-its-dependencies/50015>\
**Category:** General Usage\
**Created:** [November 12, 2020, 12:44am UTC](https://discourse.julialang.org/t/code-runs-fine-on-juno-and-intellij-idea-but-crashes-on-vscode-argumenterror-package-offsetarrays-does-not-have-adapt-in-its-dependencies/50015 "2020-11-12T00:44:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![acycliq](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@acycliq](https://discourse.julialang.org/u/acycliq)\
**Post date:** [November 12, 2020, 12:44am UTC](https://discourse.julialang.org/t/code-runs-fine-on-juno-and-intellij-idea-but-crashes-on-vscode-argumenterror-package-offsetarrays-does-not-have-adapt-in-its-dependencies/50015/1 "2020-11-12T00:44:14Z")

</div>

I am trying to use some code from a GitHub repo. I have cloned it and the code has a.` jl` file that defines a module and I think (but not 100% sure) that I am successfully loading the module from my local directory

The code below runs fine intellij idea and juno

```julia
import my_module

x = my_module.max(2,3)
println("x is: ", x)

```

In VSCode however it gives the following error. Does anyone know what that is please? Note that I get a lot more of these: `ERROR: LoadError: Failed to precompile` I am just including here the very first one

```julia
ERROR: LoadError: ArgumentError: Package OffsetArrays does not have Adapt in its dependencies:
- If you have OffsetArrays checked out for development and have
  added Adapt as a dependency but haven't updated your primary 
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with OffsetArrays  
Stacktrace:
 [1] require(::Module, ::Symbol) at .\loading.jl:906
 [2] include(::Function, ::Module, ::String) at .\Base.jl:380
 [3] include(::Module, ::String) at .\Base.jl:368
 [4] top-level scope at none:2
 [5] eval at .\boot.jl:331 [inlined]
 [6] eval(::Expr) at .\client.jl:467
 [7] top-level scope at .\none:3
in expression starting at C:\Users\skgtdni\.julia\packages\OffsetArrays\ExQCD\src\OffsetArrays.jl:485
ERROR: LoadError: Failed to precompile OffsetArrays [6fe1bfb0-de20-5000-8ca7-80f57d26f881] to C:\Users\userName\.julia\compiled\v1.5\OffsetArrays\UDEDl_pIFmw.ji.

```

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [November 12, 2020, 9:08am UTC](https://discourse.julialang.org/t/code-runs-fine-on-juno-and-intellij-idea-but-crashes-on-vscode-argumenterror-package-offsetarrays-does-not-have-adapt-in-its-dependencies/50015/2 "2020-11-12T09:08:27Z")

</div>

Seems like you’re running the code in a different environment or with a different Julia version in VSCode.

---

<div class="post-metadata">

**Author:** ![acycliq](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@acycliq](https://discourse.julialang.org/u/acycliq)\
**Post date:** [November 12, 2020, 9:23am UTC](https://discourse.julialang.org/t/code-runs-fine-on-juno-and-intellij-idea-but-crashes-on-vscode-argumenterror-package-offsetarrays-does-not-have-adapt-in-its-dependencies/50015/3 "2020-11-12T09:23:26Z")

</div>

I only have one Julia installation on my machine, at: `C:\Users\userName\AppData\Local\Programs\Julia 1.5.2` I dont really know how to fix or check the environment to be honest.  
If that helps, my `launch.json` file in VSCode contains the following:

```julia
"version": "0.2.0",
    "configurations": [
        {
            "type": "julia",
            "request": "launch",
            "name": "Run active Julia file",
            "program": "${file}",
            "stopOnEntry": false,
            "cwd": "${workspaceFolder}",
            "juliaEnv": "${command:activeJuliaEnvironment}"
        }
    ]
}

```
