Skip to content

fix(mcpb): preserve yaml/dist/doc and install required peer deps#202

Merged
polaz merged 1 commit intomainfrom
fix/#201-mcpb-missing-deps
Jan 25, 2026
Merged

fix(mcpb): preserve yaml/dist/doc and install required peer deps#202
polaz merged 1 commit intomainfrom
fix/#201-mcpb-missing-deps

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Jan 25, 2026

Summary

  • Fix MCPB bundle crash on startup due to missing yaml/dist/doc directory
  • Fix missing zod peer dependency required by @modelcontextprotocol/sdk

Root Cause

The build-mcpb.sh script had two issues:

  1. Deleted yaml/dist/doc/ - The cleanup removed all doc directories, but yaml package has actual code in dist/doc/directives.js (not documentation)

  2. Skipped peer dependencies - The --omit=peer flag prevented zod installation, which is required by MCP SDK

Changes

  • Exclude yaml package from doc directory cleanup
  • Replace --omit=peer with --omit=dev to install peer deps
  • Manually remove optional large packages (prisma CLI, typescript) after install

Test plan

  • Tested MCPB bundle with Node 24 - works
  • Tested MCPB bundle with Node 20 - works
  • Verified yaml/dist/doc directory preserved
  • Verified zod installed in bundle

Fixes #201

MCPB bundles crashed on startup due to missing dependencies:

1. yaml/dist/doc/ was deleted by cleanup (contains actual code,
   not documentation - directives.js is required by composer.js)

2. zod was not installed because --omit=peer skipped it, but
   @modelcontextprotocol/sdk requires zod as peer dependency

Changes:
- Exclude yaml package from doc directory cleanup
- Replace --omit=peer with --omit=dev to install peer deps
- Manually remove optional large packages (prisma CLI, typescript)

Fixes #201
Copilot AI review requested due to automatic review settings January 25, 2026 03:11
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes critical runtime issues in MCPB bundles that were caused by overly aggressive cleanup in the build script. The bundle previously crashed on startup due to two missing dependencies.

Changes:

  • Changed npm install flags from --omit=peer to --omit=dev to ensure peer dependencies like zod are installed
  • Added manual removal of large optional peer dependencies (prisma CLI, typescript) after installation to reduce bundle size
  • Modified directory cleanup logic to preserve the yaml/dist/doc/ directory which contains actual code, not documentation

@polaz polaz merged commit a96d258 into main Jan 25, 2026
26 checks passed
@polaz polaz deleted the fix/#201-mcpb-missing-deps branch January 25, 2026 03:17
sw-release-bot bot pushed a commit that referenced this pull request Jan 25, 2026
## [6.43.1](v6.43.0...v6.43.1) (2026-01-25)

### Bug Fixes

* **mcpb:** preserve yaml/dist/doc and install required peer deps ([#202](#202)) ([a96d258](a96d258)), closes [#201](#201)
@sw-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 6.43.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCPB bundle crashes on startup due to missing dependencies

2 participants