C
Coder.com6mo ago
Nick

VSCode Web extensions disappear after restart

Hey! So I crafted a template and installed the module vscode-web because of the copilot support and profile sync, only I am facing some issues! After I update my workspace or restart the workspace, the extensions that I installed previously are gone, I then attempted to make the /root directory presistant but that really didn't go well. Does anyone know how to solve this?
Solution:
@Nick you can set extensions_dir to a directory that is persistent in your workspace
Jump to solution
18 Replies
Codercord
Codercord6mo ago
Category: Help needed What product are you using?
Nick
NickOP6mo ago
https://registry.coder.com/modules/vscode-web this is the module I am referring to
Phorcys
Phorcys6mo ago
the extension list and extension data is stored in your browser's storage there isn't really a directory you can persist to store those
Nick
NickOP6mo ago
Oh really? That makes more sense why they are disappearing There is no solution yet for this I assume?
Phorcys
Phorcys6mo ago
this is weird though, are they also disappearing if you just close and reopen vscode web ? they should persist accross restarts, atleast on the same browser which is why I use settings sync, so i can reuse them accross different browsers
Nick
NickOP6mo ago
Nope that works perfectly, is just because I update the template alot I am a bit frustrated Oh that works for you?
Phorcys
Phorcys6mo ago
well, using settings sync or not, my extensions are still there after a workspace restart
Nick
NickOP6mo ago
Oh, thats wierd, and you are using the vscode-web? Not the VScode server ? This module
Phorcys
Phorcys6mo ago
I'm not using the vscode-web module but I'm doing the same thing in my template
Nick
NickOP6mo ago
When I authenticate with the VSCode web I authorize everything and it recognize's me etc but I dont see any profiles synced or extensions being installed and when I do it on for example vscode.dev it actually get all my profiles and themes etc I synced with the cloud
Phorcys
Phorcys6mo ago
hey @Atif, I thought that vscode-server was replaced by code serve-local? is there any reason the module doesnt' use that?
Atif
Atif6mo ago
code serve-web downloads and then runs code-server so I simplified it to directly use it.
VSCode Web extensions disappear after restart
this is probably happening because you are not persisting the extensions directory.
Solution
Atif
Atif6mo ago
@Nick you can set extensions_dir to a directory that is persistent in your workspace
Phorcys
Phorcys6mo ago
thank you for the clarification :-) vscode-server was marked as deprecated in MS' docs, turns out they just didn't want you to use it directly
Atif
Atif6mo ago
Yes probably. But it's easier to use.
Nick
NickOP6mo ago
Hey thanks for the quick response, I will probably around the evening be able to update the template and set the environment variable. But @Atif what would you suggest me? Since I had issues making the /root persistent instead add it to the /workspace? Or make a separate folder in the /root and make that persistent for the extensions?
Atif
Atif6mo ago
You can just set it to anything like /workspace/.code-server
Nick
NickOP6mo ago
Hey thanks you guys so much for the quick assistant, this actually solved my issue, due to setting the actually /workspace/.code-server I am able to even gatter all my profiles! Again thanks alot saves me alot of time!
Want results from more Discord servers?
Add your server