Skip to content

Commit e2f766f

Browse files
olivermontesclaude
andcommitted
fix: copy mcp-use and winston to packaged app
These packages are marked as external in vite config to avoid Logger.get() load-time errors, so they need to be copied manually. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f12c7c4 commit e2f766f

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

forge.config.js

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,39 @@ module.exports = {
8383
}
8484
}
8585

86-
console.log(`✅ Copied @libsql (${allDeps.size - 6} deps) and update-electron-app (${updateAppDeps.size} deps) successfully`);
86+
// Copiar mcp-use y sus dependencias (marcado como external en vite)
87+
console.log(' ✓ Finding mcp-use dependencies...');
88+
const mcpUseDeps = await getAllDependencies('mcp-use');
89+
90+
for (const dep of mcpUseDeps) {
91+
if (allDeps.has(dep) || updateAppDeps.has(dep)) continue; // Ya copiado
92+
93+
const srcPath = path.join(projectNodeModules, dep);
94+
const destPath = path.join(packageNodeModules, dep);
95+
96+
if (await fs.pathExists(srcPath)) {
97+
console.log(` - ${dep}`);
98+
await fs.copy(srcPath, destPath, { overwrite: true });
99+
}
100+
}
101+
102+
// Copiar winston (dependencia de mcp-use, marcado como external)
103+
console.log(' ✓ Finding winston dependencies...');
104+
const winstonDeps = await getAllDependencies('winston');
105+
106+
for (const dep of winstonDeps) {
107+
if (allDeps.has(dep) || updateAppDeps.has(dep) || mcpUseDeps.has(dep)) continue;
108+
109+
const srcPath = path.join(projectNodeModules, dep);
110+
const destPath = path.join(packageNodeModules, dep);
111+
112+
if (await fs.pathExists(srcPath)) {
113+
console.log(` - ${dep}`);
114+
await fs.copy(srcPath, destPath, { overwrite: true });
115+
}
116+
}
117+
118+
console.log(`✅ Copied external dependencies successfully`);
87119
}
88120
},
89121

0 commit comments

Comments
 (0)