Can't find $SHELL even though it exists
Status Fixed / completed
Maintainer reply ✓ Yes — wolffiex
Workaround ✓ Mentioned in thread ↓
Activity 7 comments · opened Mar 5, 2025 · closed Mar 5, 2025
💡 Likely answer: A maintainer (wolffiex, collaborator)
responded on this thread — see the highlighted reply below.
What the title says, basically. Worked fine until yesterday. Happy to run additional commands to help troubleshoot.
λ ~/ nixos-version
24.11.712512.3f0a8ac25fb6 (Vicuna)
λ ~/ which claude
/home/kjekac/.npm-global/bin/claude
λ ~/dev/temp/pallas/ master* nix develop
warning: Git tree '/home/kjekac/dev/temp/pallas' is dirty
[kjekac@Thastrom:~/dev/temp/pallas]$ echo $SHELL
/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
[kjekac@Thastrom:~/dev/temp/pallas]$ which bash
/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
[kjekac@Thastrom:~/dev/temp/pallas]$ claude
╭────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview! │
│ │
│ /help for help │
│ │
│ cwd: /home/kjekac/dev/temp/pallas │
╰────────────────────────────────────────────╯
╭────────────────────────────────────────────────────────────────────────────────╮
│ > │
╰────────────────────────────────────────────────────────────────────────────────╯
! for bash mode · / for commands · esc to undo \⏎ for newline
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: No suitable shell found. Claude CLI requires a Posix shell environment. Please ensure you have a valid shell installed and the SHELL environment variable set.
at i6.findSuitableShell (file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:339:8036)
at new i6 (file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:339:5985)
at i6.getInstance (file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:339:8426)
at mw (file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:344:1172)
at aH (file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:1162:14518)
at cz1.<anonymous> (file:///home/kjekac/.npm-global/lib/node_modules/@anthropi
╭────────────────────────────────────────────────────────────────────────────────╮
│ > Try "refactor kern.sire" │
╰────────────────────────────────────────────────────────────────────────────────╯
! for bash mode · / for commands · esc to undo \⏎ for newline
Error: No suitable shell found. Claude CLI requires a Posix shell environment. Please ensure you have a valid shell installed and the SHELL environment variable set.
at i6.findSuitableShell (file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:339:8036)
at new i6 (file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:339:5985)
at i6.getInstance (file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:339:8426)
at process.<anonymous> (file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:1167:5527)
at process.emit (node:events:530:35)
at process.emit (node:domain:489:12)
at process.I [as emit] (file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:139:26041)
at process.exit (node:internal/process/per_thread:183:15)
at onExit (file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:1137:1021)
at file:///home/kjekac/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:430:2280
7 Comments
same here.
+1
Update: I rolled back to the previous version as a workaround:
I get this error too. It was working for me yesterday.
I'm using zsh on Android termux. I tried updating to the latest version of claude. I also tried setting the SHELL env variable to bash.
Hi can you please try 0.2.32 and let us know if it resolves your issue? Thanks!
Yes, all good on my end. Thank you!
i have exactly the same issue, i notice you are not building the app through nixpkgs? the latest version is only 0.2.30 on nixpkgs, which the issue persists
I can confirm that this is fixed 0.2.48. Thanks
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.