Skip to content

Self-improving AI Employees for everyone

Fix client deps install for npx/global - auto npm install on first start

trohitgd4307d7f19d0
diff --git a/package.json b/package.json
index 493682a8..f9af6e76 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "machinaos",
- "version": "0.0.3",
+ "version": "0.0.4",
"description": "Open source workflow automation platform with AI agents, React Flow, and n8n-inspired architecture",
"type": "module",
"keywords": [
diff --git a/scripts/start.js b/scripts/start.js
index 09e1e562..cd151c4a 100644
--- a/scripts/start.js
+++ b/scripts/start.js
@@ -160,6 +160,13 @@ if (!existsSync(envPath) && existsSync(templatePath)) {
log('Created .env from template');
}
+// Install client dependencies if needed (for npx/global install)
+const clientNodeModules = resolve(ROOT, 'client', 'node_modules');
+if (!existsSync(clientNodeModules)) {
+ log('Installing client dependencies...');
+ execSync('npm install', { cwd: resolve(ROOT, 'client'), stdio: 'inherit', shell: true });
+}
+
// Free ports
log('Freeing ports...');
let allFree = true;