From 698ead6776f271164dadd51c01c4c2e766197768 Mon Sep 17 00:00:00 2001 From: Eric Lytle Date: Wed, 28 Jan 2026 00:10:08 -0600 Subject: [PATCH] fix: remove --prefer-offline flag to prevent stale cache errors The --prefer-offline flag causes npm to use cached package metadata, which can be stale and fail to resolve recently published versions. Also updates deprecated --production flag to --omit=dev. Fixes #1438 --- tools/cli/installers/lib/modules/manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cli/installers/lib/modules/manager.js b/tools/cli/installers/lib/modules/manager.js index efbddcf0..f4baf89a 100644 --- a/tools/cli/installers/lib/modules/manager.js +++ b/tools/cli/installers/lib/modules/manager.js @@ -416,7 +416,7 @@ class ModuleManager { if (needsDependencyInstall || wasNewClone || nodeModulesMissing) { const installSpinner = ora(`Installing dependencies for ${moduleInfo.name}...`).start(); try { - execSync('npm install --production --no-audit --no-fund --prefer-offline --no-progress', { + execSync('npm install --omit=dev --no-audit --no-fund --no-progress', { cwd: moduleCacheDir, stdio: 'pipe', timeout: 120_000, // 2 minute timeout @@ -441,7 +441,7 @@ class ModuleManager { if (packageJsonNewer) { const installSpinner = ora(`Installing dependencies for ${moduleInfo.name}...`).start(); try { - execSync('npm install --production --no-audit --no-fund --prefer-offline --no-progress', { + execSync('npm install --omit=dev --no-audit --no-fund --no-progress', { cwd: moduleCacheDir, stdio: 'pipe', timeout: 120_000, // 2 minute timeout