# Error "Julia package not part of current environment"

**URL:** <https://discourse.julialang.org/t/error-julia-package-not-part-of-current-environment/42903>\
**Category:** VS Code\
**Created:** [July 11, 2020, 5:28pm UTC](https://discourse.julialang.org/t/error-julia-package-not-part-of-current-environment/42903 "2020-07-11T17:28:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)\
**Post date:** [July 11, 2020, 5:28pm UTC](https://discourse.julialang.org/t/error-julia-package-not-part-of-current-environment/42903/1 "2020-07-11T17:28:27Z")

</div>

Hello.  
When I start VS Code (with Julia 1.5 and extension  
julia-vscode 0.17.2 and some olders too) I get this error:

> You opened a julia package that is not part of your current environment. Do you want to activate a different environment?  
> Source: Julia Insider (Extension).

How can I solve this problem?

---

<div class="post-metadata">

**Author:** ![drandran12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drandran12/32/220647_2.png) [@drandran12](https://discourse.julialang.org/u/drandran12)\
**Post date:** [November 9, 2021, 7:53am UTC](https://discourse.julialang.org/t/error-julia-package-not-part-of-current-environment/42903/2 "2021-11-09T07:53:54Z")

</div>

I have the same problem

---

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)\
**Post date:** [November 9, 2021, 12:37pm UTC](https://discourse.julialang.org/t/error-julia-package-not-part-of-current-environment/42903/3 "2021-11-09T12:37:38Z")

</div>

Maybe the problem was related with this one:

> [@VS Code keeps older Julia sessions, but produces errors](https://discourse.julialang.org/t/vs-code-keeps-older-julia-sessions-but-produces-errors/71111):
>
> Hello. I’m using VS Code 1.62.0 with Julia 1.6.3 and the VS extension 1.4.3 for Julia. When I open VS Code I see several terminals, in multiple tabs. It seems it keeps every session and tries to load all of them every time, adding a new one when I start VS Code again. It says: Session contents restored from 7/11/2021 at 4:54:42 But it also produces an error: ERROR: LoadError: IOError: connect: no such file or directory (ENOENT) Stacktrace: [1] wait\_connected(x::Base.PipeEndpoint) @ Soc…

And it seems to be solved disabling the `terminal.integrated.enablePersistentSessions` setting.

Now it doesn’t try to load older sessions and it doesn’t produce that error.
