Lines 57-97javascript
58 console.log(chalk.yellow(" Server started but health check timed out"));
61 console.log(chalk.green(" Server ready"));
63 // 3. Start dashboard (unless --no-dashboard)
64 if (!opts.noDashboard) {
65 console.log(chalk.blue("Preparing Dashboard..."));
66 let dashboardInstalled = isDashboardInstalled();
67 if (!dashboardInstalled) {
68 // Download synchronously with progress — avoids binding the dashboard port
69 // with a fallback server, which caused EADDRINUSE on restart (C2/I1/M4).
70 console.log(chalk.blue(" Dashboard not found, downloading..."));
72 await ensureDashboardInstalled();
73 console.log(chalk.green(" Dashboard download complete"));
74 dashboardInstalled = isDashboardInstalled();
77 console.log(chalk.red(" Dashboard download failed"));
78 console.log(chalk.yellow(` You can still use the API at http://localhost:${opts.port}`));
79 console.log(chalk.yellow(" To manually download the dashboard, visit: https://github.com/devflow-tools/devflow"));
82 if (dashboardInstalled) {
84 const dashboardPath = await ensureDashboardInstalled();
85 const serverPath = join(dashboardPath, "server.js");
86 if (existsSync(serverPath)) {
87 const child = spawn("node", [serverPath], {
88 env: { ...process.env, PORT: String(opts.dashboardPort) },
89 cwd: dashboardPath,
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/commands/start.jsView on unpkg · L77 94 const dashPidFile = getDashboardPidFile();
95 const dotdev = join(process.cwd(), ".devflow");
96 if (!existsSync(dotdev))
97 mkdirSync(dotdev, { recursive: true });