From 6ec4d5f023c3c000cda569255a3486e8710c39bf Mon Sep 17 00:00:00 2001 From: zimbatm Date: Thu, 3 Jul 2025 15:25:12 +0200 Subject: [PATCH] claude-code: fix issue with DEV=true When running in environments where DEV=true is set, claude would fail with: TypeError: window.WebSocket is not a constructor --- pkgs/by-name/cl/claude-code/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/cl/claude-code/package.nix b/pkgs/by-name/cl/claude-code/package.nix index fb421ed233e3..b81187ca9982 100644 --- a/pkgs/by-name/cl/claude-code/package.nix +++ b/pkgs/by-name/cl/claude-code/package.nix @@ -28,9 +28,11 @@ buildNpmPackage rec { # `claude-code` tries to auto-update by default, this disables that functionality. # https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#environment-variables + # The DEV=true env var causes claude to crash with `TypeError: window.WebSocket is not a constructor` postInstall = '' wrapProgram $out/bin/claude \ - --set DISABLE_AUTOUPDATER 1 + --set DISABLE_AUTOUPDATER 1 \ + --unset DEV ''; passthru.updateScript = ./update.sh;