Julia runs in terminal but not in vscode. Pkg manager also does not seem to work

Hello,

I am new to Julia and I have installed Julia on my work computer. Everything seems to be working on personal computer, so I think it might be a proxy issue? I can’t run Julia in vscode or add any packages. These are some of the issues I see.

julia> add Pluto
ERROR: syntax: extra token "Pluto" after end of expression
Stacktrace:
 [1] top-level scope
   @ none:1

(@v1.9) pkg> add Pluto
  Installing known registries into `C:\Users\CMILLER\.julia`
┌ Warning: unable to decompress and read archive
│   exception = IOError: could not spawn setenv(`'C:\Users\CMILLER\AppData\Local\Programs\Julia-1.9.3\libexec\julia\7z.exe' x 'C:\Users\CMILLER\AppData\Local\Temp\jl_X27A52n6LC' -so`,["WINDIR=C:\\WINDOWS", "PATH=C:\\Users\\CMILLER\\AppData\\Local\\Programs\\Julia-1.9.3\\bin\\..\\lib\\julia;C:\\Users\\CMILLER\\AppData\\Local\\Programs\\Julia-1.9.3\\bin\\..\\lib;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Hyland\\Web ActiveX\\;C:\\Program Files (x86)\\dotnet\\;C:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\;C:\\Program Files (x86)\\TXDOT\\CAP18\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\dotnet\\;C:\\Users\\CMILLER\\scoop\\shims;C:\\Users\\CMILLER\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\CMILLER\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\CMILLER\\AppData\\Local\\Programs\\Git\\cmd;C:\\Users\\CMILLER\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\CMILLER\\AppData\\Local\\JetBrains\\Toolbox\\scripts;C:\\Users\\CMILLER\\AppData\\Local\\Programs\\Julia-1.9.4\\bin", "USERDOMAIN_ROAMINGPROFILE=INTRANET", "ZES_ENABLE_SYSMAN=1", "LOCALAPPDATA=C:\\Users\\CMILLER\\AppData\\Local", "HOMEPATH=\\Users\\CMILLER", "PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 141 Stepping 1, GenuineIntel", "NUMBER_OF_PROCESSORS=16", "ADSK_CLM_WPAD_PROXY_CHECK=FALSE", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "SYSTEMROOT=C:\\WINDOWS", "APPDATA=C:\\Users\\CMILLER\\AppData\\Roaming", "=::=::\\", "NMATH_LICENSE_KEY=XTUU-3UU7-8SG8-8FC4-AAU1-VUUF-1QS1-WPUF-19SU-WPUC-1Q4A-FX0T-FRPP-X8NS-WQSF-EP3F-C8SV-Y63F-1QSS-YDPS-9WJF-6E2U-9UV5-RMEA-7S7U-F8U", "COMMONPROGRAMW6432=C:\\Program Files\\Common Files", "HELIX_RUNTIME=C:\\Users\\CMILLER\\source\\repos\\helix\\runtime", "PROGRAMDATA=C:\\ProgramData", "PSMODULEPATH=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules", "PUBLIC=C:\\Users\\Public", "OS=Windows_NT", "USERDOMAIN=INTRANET", "PROCESSOR_REVISION=8d01", "TMP=C:\\Users\\CMILLER\\AppData\\Local\\Temp", "ONEDRIVECOMMERCIAL=C:\\Users\\CMILLER\\OneDrive - HDR, Inc", "COMMONPROGRAMFILES(X86)=C:\\Program Files (x86)\\Common Files", "COMSPEC=C:\\WINDOWS\\system32\\cmd.exe", "OPENBLAS_DEFAULT_NUM_THREADS=1", "FDOTSS4_PROJECTS=\\\\DALSRV02\\PWExternal\\172043\\10119813\\", "ADSKFLEX_LICENSE_FILE=27009@autodesk-license-primary;27009@autodesk-license-secondary;27000@cs-adsk.intranet.hdr", "ALLUSERSPROFILE=C:\\ProgramData", "UATDATA=C:\\WINDOWS\\CCM\\UATData\\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77", "COMMONPROGRAMFILES=C:\\Program Files\\Common Files", "COMPUTERNAME=DAL-BST96L3", "ONEDRIVE=C:\\Users\\CMILLER\\OneDrive - HDR, Inc", "USERNAME=CMILLER", "FDOTSS4_LOCAL=\\\\DALSRV02\\ECGCADStandards\\2010_HDR_LSET\\users\\CMILLER\\FDOTSS4\\", "FLEXLM_TIMEOUT=3000000", "PROGRAMFILES(X86)=C:\\Program Files (x86)", "PROGRAMFILES=C:\\Program Files", "LOGONSERVER=\\\\OMAPI-DC12", "ONEDRIVECONSUMER=C:\\Users\\CMILLER\\OneDrive", "USERPROFILE=C:\\Users\\CMILLER", "DRIVERDATA=C:\\Windows\\System32\\Drivers\\DriverData", "FPS_BROWSER_USER_PROFILE_STRING=Default", "PROCESSOR_LEVEL=6", "FDOTSS4_SERVER=\\\\DALSRV02\\ECGCADStandards\\FDOTSS4\\", "MDX_HOST=127.0.0.1", "SYSTEMDRIVE=C:", "USERDNSDOMAIN=INTRANET.HDR", "FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer", "PROGRAMW6432=C:\\Program Files", "TEMP=C:\\Users\\CMILLER\\AppData\\Local\\Temp", "HOMEDRIVE=C:", "OPENBLAS_MAIN_FREE=1", "PROCESSOR_ARCHITECTURE=AMD64"]): unknown error (UNKNOWN)
└ @ Pkg.PlatformEngines C:\Users\CMILLER\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\PlatformEngines.jl:665
ERROR: unable to verify download from https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/242f9e7d07f105e9153757c906266d5a9aa5cd53

image

The Language Server failed to precompile.
Please make sure you have permissions to write to the LS depot path at
	c:\Users\CMILLER\AppData\Roaming\Code\User\globalStorage\julialang.language-julia\lsdepot\v1

┌ Error: Some Julia code in the VS Code extension crashed
└ @ Main c:\Users\CMILLER\.vscode\extensions\julialang.language-julia-1.65.2\scripts\error_handler.jl:15
ERROR: Failed to precompile LanguageServer [2b0e0bc5-e4fd-59b4-8912-456d1b03d8d7] to "c:\\Users\\CMILLER\\AppData\\Roaming\\Code\\User\\globalStorage\\julialang.language-julia\\lsdepot\\v1\\compiled\\v1.9\\LanguageServer\\jl_F080.tmp".
Stacktrace:
 [1] top-level scope
   @ c:\Users\CMILLER\.vscode\extensions\julialang.language-julia-1.65.2\scripts\languageserver\main.jl:77
 [2] include(mod::Module, _path::String)
   @ Base .\Base.jl:457
 [3] exec_options(opts::Base.JLOptions)
   @ Base .\client.jl:307
 [4] _start()
   @ Base .\client.jl:522
[Error - 10:18:13 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:18:13 AM] The Julia Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 10:18:13 AM] Julia Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:18:13 AM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:18:13 AM] Server process exited with code 1.

It has been unusable these last few months. Any help is much appreciated. Thanks.

How did you install Julia? The best way is to use juliaup: GitHub - JuliaLang/juliaup: Julia installer and version multiplexer

It also configures VSCode to work well with Julia.

But, to be honest, I never saw this error before:

ERROR: unable to verify download from https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/242f9e7d07f105e9153757c906266d5a9aa5cd53

In addition, you can use the “Terminal” of VSCode and start Julia from the command line. Does that work?

Yes, running julia from terminal in vscode works, but I can’t run the program using the run button. I have to call it through terminal. I will try to uninstall julia and use the method you linked to. I just used julia website previously to install. I will let you know how it goes.

Although not your main question, I think that you are trying to run here

julia> ]add Pluto

Your closing braquet is missing

I don’t think so. If you press ] you enter package manager mode, to finish it you press the <BACKSPACE> key.

If you know your work computer runs through a proxy, then you could look at this post New Julia install: Downloading artifacts fails behind proxy to see if updating the proxy settings would help.

You might need to set the environment variable JULIA_DEPOT_PATH to a folder that you have permissions for.