mirror of
https://github.com/samvallad33/vestige.git
synced 2026-05-08 23:32:37 +02:00
fix(npm): download binaries during postinstall
The npm package was missing the actual binary download step - users got wrapper scripts pointing to non-existent binaries. Changes: - postinstall.js now downloads correct binary from GitHub releases - Added vestige.js wrapper for CLI binary - Exposed both vestige-mcp and vestige commands in package.json - Updated README with troubleshooting, storage info, CLI docs - Added .gitignore for downloaded binaries Fixes fresh install issues where Claude Desktop couldn't attach and vestige CLI wasn't found. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e5b27ff1e5
commit
1e06344319
6 changed files with 278 additions and 24 deletions
|
|
@ -2,18 +2,30 @@
|
|||
|
||||
const { spawn } = require('child_process');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
|
||||
const platform = os.platform();
|
||||
const arch = os.arch();
|
||||
|
||||
const binaryName = platform === 'win32' ? 'vestige-mcp.exe' : 'vestige-mcp';
|
||||
const binaryPath = path.join(__dirname, '..', 'bin', binaryName);
|
||||
const binaryPath = path.join(__dirname, binaryName);
|
||||
|
||||
if (!fs.existsSync(binaryPath)) {
|
||||
console.error('Error: vestige-mcp binary not found.');
|
||||
console.error(`Expected at: ${binaryPath}`);
|
||||
console.error('');
|
||||
console.error('Try reinstalling: npm install -g @vestige/mcp');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const child = spawn(binaryPath, process.argv.slice(2), {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
child.on('error', (err) => {
|
||||
console.error('Failed to start vestige-mcp:', err.message);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
child.on('exit', (code) => {
|
||||
process.exit(code ?? 0);
|
||||
});
|
||||
|
|
|
|||
31
packages/vestige-mcp-npm/bin/vestige.js
Executable file
31
packages/vestige-mcp-npm/bin/vestige.js
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const { spawn } = require('child_process');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
|
||||
const platform = os.platform();
|
||||
const binaryName = platform === 'win32' ? 'vestige.exe' : 'vestige';
|
||||
const binaryPath = path.join(__dirname, binaryName);
|
||||
|
||||
if (!fs.existsSync(binaryPath)) {
|
||||
console.error('Error: vestige CLI binary not found.');
|
||||
console.error(`Expected at: ${binaryPath}`);
|
||||
console.error('');
|
||||
console.error('Try reinstalling: npm install -g @vestige/mcp');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const child = spawn(binaryPath, process.argv.slice(2), {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
child.on('error', (err) => {
|
||||
console.error('Failed to start vestige:', err.message);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
child.on('exit', (code) => {
|
||||
process.exit(code ?? 0);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue