Nothing fancy, I just put
programs.vscode.enable = true;
in home manager config. I am presented with this error after a successful rebuild switch.
[1117/114505.763499:FATAL:v8_initializer.cc(538)] Error loading V8 startup snapshot file
/nix/store/1lqh595004maiapcx72wkp65r1nbnh9n-vscode-1.84.2/bin/.code-wrapped: line 63: 39906 Trace/breakpoint trap (core dumped) ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" --ms-enable-electron-run-as-node "$@"
I have tried a lot of fixes, from reinstalling, to adding some custom settings in vscode config. Nothing seems to work. Thanks in advance! If you want any additional information, let me know.
Did you mean to attach a picture of the error?
I’m using Nvidia with Hyprland.
I had troubles with vscode, I don’t actually use the program but the last time I checked this was working for me:
{ pkgs, home-manager, username, ... }: { home-manager.users.${username} = { pkgs, ... }: { # VS Code on Wayland has issues, make sure to set the title bar to custom # https://github.com/microsoft/vscode/issues/181533 programs.vscode = { enable = true; enableUpdateCheck = true; enableExtensionUpdateCheck = true; extensions = with pkgs.vscode-extensions; [ golang.go vscodevim.vim github.copilot github.github-vscode-theme github.vscode-github-actions #ms-python.python ms-vscode.powershell bbenoist.nix ]; userSettings = { "window.titleBarStyle" = "custom"; "workbench.colorTheme" = "Github Dark Colorblind (Beta)"; "editor.fontFamily" = "'M+1Code Nerd Font','Droid Sans Mono', 'monospace', monospace"; "github.copilot.enable" = { "*" = true; "plaintext" = false; "markdown" = true; "scminput" = false; }; "powershell.powerShellAdditionalExePaths" = "/run/current-system/sw/bin/pwsh"; }; }; }; }
Sorry, I couldn’t access my Nix for sometime. I’ll check right away.
Do you have these environment variables anywhere else? This is the only other setting I have that even interacts with electron or wayland:
# Force wayland when possible
environment.sessionVariables.NIXOS_OZONE_WL = "1";
It might be worth it to try clearing the electron cache and to do a
nix-collect-garbage -d
if you dont have any old generations you need to keep around.rm -rf ~/.electron
These are just guesses and the next steps that I would take to troubleshoot. I’m sorry I couldn’t be of more help!
Hi, I updated my flake, and now vscode launches with these settings. Thanks a lot man!
For people arriving here, update you flake with :
nix flake update
https://github.com/microsoft/vscode/issues/183314 seems related
I’ve checked that, tried reinstalling as well. No luck.