Skip to content

fix: build workspace-analyzer before running analyze#2949

Merged
marcusrbrown merged 1 commit intomainfrom
fix/pnpm-analyze-build-step
Apr 5, 2026
Merged

fix: build workspace-analyzer before running analyze#2949
marcusrbrown merged 1 commit intomainfrom
fix/pnpm-analyze-build-step

Conversation

@fro-bot
Copy link
Copy Markdown
Contributor

@fro-bot fro-bot commented Mar 26, 2026

Summary

The pnpm analyze script fails in fresh CI environments because it directly calls node packages/workspace-analyzer/lib/cli.js without first building the workspace-analyzer package. In a typical pnpm install workflow, workspace packages are symlinked without running their build scripts.

Fix

Added pnpm --filter @bfra.me/workspace-analyzer build as a prerequisite step in the analyze script, ensuring the CLI is compiled before invocation.

Testing

  • pnpm analyze now works correctly in environments without pre-built packages
  • Build is incremental (only rebuilds if source changed)

The analyze script calls node packages/workspace-analyzer/lib/cli.js directly,
which fails in fresh CI environments where packages are not pre-built. In a
typical pnpm install workflow, workspace packages are symlinked without running
their build scripts (prepack only runs during npm pack/publish).

Adding pnpm --filter @bfra.me/workspace-analyzer build ensures the package is
compiled before the CLI is invoked, making the command work in any environment.
@fro-bot
Copy link
Copy Markdown
Contributor Author

fro-bot commented Mar 26, 2026

Autoheal Fix

Root cause: The analyze script in root package.json calls node packages/workspace-analyzer/lib/cli.js directly. In fresh CI environments, workspace packages are installed as symlinks without running their build scripts, so lib/cli.js does not exist.

Fix: Prepend pnpm --filter @bfra.me/workspace-analyzer build to ensure the package is compiled before the CLI is invoked.


Run Summary
Field Value
Event schedule
Repository bfra-me/works
Run ID 23578827011
Session ses_2d7698573ffeaYluHD4jSnTddD

@marcusrbrown marcusrbrown merged commit a84005e into main Apr 5, 2026
12 checks passed
@marcusrbrown marcusrbrown deleted the fix/pnpm-analyze-build-step branch April 5, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants