Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(install): keep node setup optional

cyh9f3d17d8f0a7
diff --git a/install.ps1 b/install.ps1
index 970c66a73..e3df7c983 100644
--- a/install.ps1
+++ b/install.ps1
@@ -92,7 +92,7 @@ function Install-Node {
if ($result.Output) {
$message += ":`n$($result.Output)"
}
- Write-Error $message
+ throw $message
}
$persistedPath = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
@@ -103,7 +103,20 @@ function Install-Node {
}
}
- Write-Error "Node.js 20+ is required for Show Pages runtime. Please install Node.js LTS from https://nodejs.org/ and rerun this script."
+ throw "Node.js 20+ is required for Show Pages runtime. Please install Node.js LTS from https://nodejs.org/ if needed."
+}
+
+function Install-NodeOptional {
+ try {
+ Install-Node
+ } catch {
+ $message = ($_ | Out-String).Trim()
+ if ($message) {
+ Write-Warning $message
+ }
+ Write-Warning "Node.js 20+ is not available, so managed Show Pages may install/start later when first used."
+ Write-Warning "Continuing with Vibe Remote installation; install Node.js manually if Show Pages runtime reports it missing."
+ }
}
function Install-Uv {
@@ -338,8 +351,9 @@ function Main {
# Install uv (which manages Python automatically)
Install-Uv
- # Install Node.js for managed Show Page runtime if needed.
- Install-Node
+ # Node.js only powers the optional managed Show Page runtime. Never let it
+ # block installation of the main Vibe Remote CLI/service.
+ Install-NodeOptional
# Install vibe-remote
Install-Vibe
diff --git a/install.sh b/install.sh
index 694d35bda..49219456b 100755
--- a/install.sh
+++ b/install.sh
@@ -324,27 +324,30 @@ install_node() {
case "$os" in
macos)
if command_exists brew; then
- brew install node || error "Failed to install Node.js with Homebrew"
+ brew install node || return 1
else
- error "Node.js 20+ is required. Install Homebrew or Node.js from https://nodejs.org/ and rerun this script."
+ warn "Node.js 20+ is required for managed Show Pages. Install Homebrew or Node.js from https://nodejs.org/ if needed."
+ return 1
fi
;;
linux)
if command_exists apt-get; then
- curl -fsSL https://deb.nodesource.com/setup_22.x | run_as_root bash - || error "Failed to configure NodeSource repository"
- run_as_root apt-get install -y nodejs || error "Failed to install Node.js with apt"
+ curl -fsSL https://deb.nodesource.com/setup_22.x | run_as_root bash - || return 1
+ run_as_root apt-get install -y nodejs || return 1
elif command_exists dnf; then
- run_as_root dnf install -y nodejs npm || error "Failed to install Node.js with dnf"
+ run_as_root dnf install -y nodejs npm || return 1
elif command_exists yum; then
- run_as_root yum install -y nodejs npm || error "Failed to install Node.js with yum"
+ run_as_root yum install -y nodejs npm || return 1
elif command_exists pacman; then
- run_as_root pacman -S --noconfirm nodejs npm || error "Failed to install Node.js with pacman"
+ run_as_root pacman -S --noconfirm nodejs npm || return 1
else
- error "Node.js 20+ is required. Please install Node.js globally with your system package manager and rerun this script."
+ warn "Node.js 20+ is required for managed Show Pages. Please install Node.js globally with your system package manager if needed."
+ return 1
fi
;;
*)
- error "Node.js 20+ is required. Please install Node.js globally and rerun this script."
+ warn "Node.js 20+ is required for managed Show Pages. Please install Node.js globally if needed."
+ return 1
;;
esac
@@ -353,7 +356,23 @@ install_node() {
return 0
fi
- error "Node.js installation completed but node 20+ is not available in PATH"
+ warn "Node.js installation completed but node 20+ is not available in PATH"
+ return 1
+}
+
+install_node_optional() {
+ set +e
+ install_node
+ local node_status=$?
+ set -e
+
+ if [ "$node_status" -eq 0 ]; then
+ return 0
+ fi
+
+ warn "Node.js 20+ is not available, so managed Show Pages may install/start later when first used."
+ warn "Continuing with Vibe Remote installation; install Node.js manually if Show Pages runtime reports it missing."
+ return 0
}
uv_tool_install() {
@@ -577,8 +596,9 @@ main() {
warn "Could not find a writable directory in PATH; falling back to ~/.local/bin where possible"
fi
- # Install Node.js for managed Show Page runtime if needed.
- install_node
+ # Node.js only powers the optional managed Show Page runtime. Never let it
+ # block installation of the main Vibe Remote CLI/service.
+ install_node_optional
# Install vibe-remote
install_vibe
diff --git a/tests/test_install_script.py b/tests/test_install_script.py
index 9507773c1..54c384952 100644
--- a/tests/test_install_script.py
+++ b/tests/test_install_script.py
@@ -202,6 +202,40 @@ def test_install_script_installs_node_when_missing(tmp_path):
assert (path_dir / "node").exists()
+def test_install_script_continues_when_node_install_fails(tmp_path):
+ home_dir = tmp_path / "home"
+ home_dir.mkdir()
+ path_dir = tmp_path / "path-bin"
+ path_dir.mkdir()
+ uv_log = tmp_path / "uv-tool-bin-dir.txt"
+
+ _write_fake_uv(path_dir / "uv", uv_log)
+ _write_fake_uname(path_dir / "uname", machine="arm64")
+ _write_executable(
+ path_dir / "brew",
+ """\
+ #!/usr/bin/env bash
+ echo "brew install failed" >&2
+ exit 1
+ """,
+ )
+
+ env = os.environ.copy()
+ env["HOME"] = str(home_dir)
+ env["PATH"] = os.pathsep.join([str(path_dir), "/usr/bin", "/bin"])
+ env["VIBE_INSTALL_SKIP_NODE"] = "0"
+
+ install_result = _install(env, cwd=tmp_path)
+ version_result = _vibe_version(env)
+
+ assert install_result.returncode == 0, install_result.stdout + install_result.stderr
+ assert "Installing Node.js 20+" in install_result.stdout
+ assert "Continuing with Vibe Remote installation" in install_result.stdout
+ assert "vibe-remote installed successfully" in install_result.stdout
+ assert version_result.returncode == 0, version_result.stdout + version_result.stderr
+ assert "vibe-remote 9.9.9" in version_result.stdout
+
+
def test_install_script_prefers_new_bin_over_stale_local_bin(tmp_path):
home_dir = tmp_path / "home"
home_dir.mkdir()