Skip to content

env: node: No such file or directory - CC Switch

Quick fix

Upgrading cc-switch to v3.18.0 or newer fixes the environment variable resolution failure caused by a stripped PATH in the GUI.

Error output
env: node: No such file or directory

Running an upgrade or launch command directly from the GUI, the system passes a stripped-down PATH environment variable, so the shebang in a script (#!/usr/bin/env node) or the application executable cannot be resolved. The defect mainly affects applications that depend on the npm path or a global CLI (OpenClaw, Claude Code).

From v3.18.0, the updater prepends the npm sibling bin directory to PATH automatically before running the anchored npm upgrade command, covering common Node installations through nvm, fnm, mise, and Homebrew. Some Windows users report a restart relieving it temporarily, but the real answer is still the updated environment injection logic.

  1. Uninstall your current version of cc-switch, then download and install v3.18.0 or newer from the official repository.

ToolOpenClaw / Claude Code
Version3.16.3 - 3.16.5(受影响范围)
PlatformsmacOSWindows

(No FAQ yet)

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.