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.
This commit is contained in:
2026-02-13 12:32:53 -08:00
parent dc0c77c6dc
commit 79c045dd28
+3 -1
View File
@@ -3,7 +3,9 @@ import { execSync } from 'child_process';
console.log('Running pre-build...');
try {
execSync('npx @hanzo/docs-mdx', { stdio: 'inherit' });
// 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);