Files
docs/apps/bot-docs/scripts/pre-build.ts
zeekay 250856b90a fix: resolve docs-mdx bin directly in pre-build script
pnpm install creates workspace symlinks but skips bin link creation
when dist files don't exist yet. After turbo builds the packages,
the dist files exist through the workspace symlink but the bin links
remain missing. Using node directly bypasses the bin link entirely.
2026-02-13 12:32:53 -08:00

14 lines
449 B
TypeScript

import { execSync } from 'child_process';
console.log('Running pre-build...');
try {
// Use node directly instead of npx — pnpm workspace links exist but bin
// symlinks may not be created if packages weren't built before pnpm install
execSync('node ./node_modules/@hanzo/docs-mdx/dist/bin.js', { stdio: 'inherit' });
console.log('Pre-build complete');
} catch (error) {
console.error('Pre-build failed:', error);
process.exit(1);
}