Allow use within legacy node project

Resolved 💬 3 comments Opened Feb 25, 2025 by patcoll Closed Feb 25, 2025

If I run within a legacy node project with Node version less than 18, I get: Error: Claude Code requires Node.js version 18 or higher.

It would be great to be able to specify which Node binary to use with an environment variable. Currently I'm using this wrapper script to accomplish something similar:

#!/bin/sh

if [[ -n "$NODE_BINARY" ]]; then
	exec env PATH="$(dirname $NODE_BINARY):$PATH" claude "$@"
fi

exec claude "$@"

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗