Skip to content

Release 0.4.1: let the LPM CLI install the package again - #7

Merged
tolgaergin merged 1 commit into
mainfrom
fix/install-with-lpm-cli-linker
Nov 12, 2026
Merged

tolgaergin merged 1 commit into
mainfrom
fix/install-with-lpm-cli-linker

Conversation

@tolgaergin

Copy link
Copy Markdown
Contributor

While checking 0.4.0 with a real LPM CLI 0.85.0, I found that lpm mcp serve could not install this package at all:

✗ Store error
  reason virtual-store linker: cannot derive peer "zod" of @modelcontextprotocol/sdk@1.32.2 because "zod" has 2 candidate instances; exact peer targets are required

This isn't new in 0.4.0. 0.3.0 fails the same way, and has since MCP SDK 1.32.2 (2026-10-23). The SDK takes zod as both a dependency and a peer, with ^3.25 || ^4.0. This package asked for ^3.24.0, so the install had zod 3.25.76 for this package beside zod 4.x for the SDK. The LPM CLI's linker looks a peer up by name, finds two versions, and stops. CLIs before 0.86.0 run this package for their own lpm mcp serve, so their MCP server didn't start, and those users never saw the retirement notice.

Change

  • Ask for zod with the SDK's exact range, ^3.25 || ^4.0, so the install has a single zod. The lockfile moves to zod 4.6.7. The server's schemas run unchanged on zod 4.
  • A test pins the range to the SDK's. It fails on 0.4.0's range.

Verification

  • npm test: 372 passed, on zod 4.6.7. npm run lint is clean.
  • Against a local verdaccio registry, with real CLI binaries:
    • CLI 0.85.0 lpm mcp serve, original 0.4.0 as latest: reproduces the store error above.
    • CLI 0.85.0 lpm mcp serve, this branch as latest (0.4.1): installs and starts. The bundled server answers with 17 tools, lpm_search returns results, and the retirement instructions reach the client.
    • lpm install of a project depending on 0.4.1: succeeds on CLI 0.85.0 and 0.86.0. Both fail on 0.4.0.
  • The bundled server works with zod 4 end to end (lpm_search against lpm.dev).

The linker bug itself is in the LPM CLI, and 0.86.0 has it too. I'll report it separately for lpm-dev/rust-client.

🤖 Generated with Claude Code

Since MCP SDK 1.32.2, LPM CLI releases before 0.86.0 failed to install
this package for their `lpm mcp serve`: the SDK takes zod as both a
dependency and a peer, this package's `^3.24.0` resolved a second zod
beside the SDK's 4.x, and the LPM CLI's linker refuses a peer with two
installed versions. Ask for zod with the SDK's own range so one zod is
installed, and run on zod 4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tolgaergin
tolgaergin merged commit 555535c into main Nov 12, 2026
2 checks passed
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.

1 participant