Compare commits

...

2 Commits

Author SHA1 Message Date
Drickon 4df55a5c36
Merge 698ead6776 into 98b97cf4fd 2026-01-29 13:30:18 +01:00
Eric Lytle 698ead6776 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
2026-01-28 00:10:08 -06:00
1 changed files with 2 additions and 2 deletions

View File

@ -416,7 +416,7 @@ class ModuleManager {
if (needsDependencyInstall || wasNewClone || nodeModulesMissing) { if (needsDependencyInstall || wasNewClone || nodeModulesMissing) {
const installSpinner = ora(`Installing dependencies for ${moduleInfo.name}...`).start(); const installSpinner = ora(`Installing dependencies for ${moduleInfo.name}...`).start();
try { 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, cwd: moduleCacheDir,
stdio: 'pipe', stdio: 'pipe',
timeout: 120_000, // 2 minute timeout timeout: 120_000, // 2 minute timeout
@ -441,7 +441,7 @@ class ModuleManager {
if (packageJsonNewer) { if (packageJsonNewer) {
const installSpinner = ora(`Installing dependencies for ${moduleInfo.name}...`).start(); const installSpinner = ora(`Installing dependencies for ${moduleInfo.name}...`).start();
try { 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, cwd: moduleCacheDir,
stdio: 'pipe', stdio: 'pipe',
timeout: 120_000, // 2 minute timeout timeout: 120_000, // 2 minute timeout