@papercraneai/cli 1.7.0-beta.2 → 1.7.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dev-server.js +16 -1
- package/package.json +1 -1
package/lib/dev-server.js
CHANGED
|
@@ -348,8 +348,23 @@ export default nextConfig;
|
|
|
348
348
|
// npm install — only if node_modules doesn't exist yet
|
|
349
349
|
const nmDir = path.join(workspaceDir, 'node_modules');
|
|
350
350
|
if (!fsSync.existsSync(nmDir)) {
|
|
351
|
+
// Check npm cache state before install
|
|
352
|
+
try {
|
|
353
|
+
const cacheInfo = execSync('npm cache ls 2>/dev/null | wc -l', { encoding: 'utf-8' }).trim();
|
|
354
|
+
console.log(`[debug] npm cache entries before install: ${cacheInfo}`);
|
|
355
|
+
} catch {}
|
|
356
|
+
|
|
351
357
|
console.log('Installing dependencies...');
|
|
352
|
-
|
|
358
|
+
const installStart = Date.now();
|
|
359
|
+
execSync('npm install --prefer-offline --timing', { cwd: workspaceDir, stdio: 'inherit' });
|
|
360
|
+
const installDuration = ((Date.now() - installStart) / 1000).toFixed(1);
|
|
361
|
+
console.log(`[debug] npm install took ${installDuration}s`);
|
|
362
|
+
|
|
363
|
+
// Check what ended up in node_modules
|
|
364
|
+
try {
|
|
365
|
+
const depCount = execSync('ls node_modules | wc -l', { cwd: workspaceDir, encoding: 'utf-8' }).trim();
|
|
366
|
+
console.log(`[debug] ${depCount} packages in node_modules`);
|
|
367
|
+
} catch {}
|
|
353
368
|
}
|
|
354
369
|
}
|
|
355
370
|
|