CairoMakie with Julia 1.8 on VScode

Another similar issue, which I think is reproducible. I installed CairoMakie and GLMakie, and I plotted using GLMakie in the VScode terminal on macOS. This opened up a separate plot window. I didn’t know a GLMakie function that closes this window from REPL, I force-quitted the window using macOS’s Force Quit. This closed VScode REPL. When I restarted REPL, both using CairoMakie and using GLMakie generated errors similar to those reported in OP.

I had to rm and add both packages to resolve the issue. Not sure if I restarted VScode or not between rm and add.