fix: bump zod to ^3.25 for MCP SDK zod/v3 export compatibility#10926
Open
xiaoshuai wants to merge 1 commit into
Open
fix: bump zod to ^3.25 for MCP SDK zod/v3 export compatibility#10926xiaoshuai wants to merge 1 commit into
xiaoshuai wants to merge 1 commit into
Conversation
@modelcontextprotocol/sdk@1.29.0 imports from 'zod/v3' in zod-compat.js, which is only exported by zod >= 3.25. The ^3.24.1 range allowed pnpm to resolve zod@3.24.1 which lacks this subpath export, causing ERR_PACKAGE_PATH_NOT_EXPORTED when running via pnpm dlx.
Contributor
|
@xiaoshuai is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix:
pnpm dlx shadcnfails with ERR_PACKAGE_PATH_NOT_EXPORTEDProblem
Running
pnpm dlx shadcn@latest initcrashes with:Root Cause
@modelcontextprotocol/sdk@1.29.0(a dependency of shadcn) unconditionally importszod/v3in itszod-compat.js. The./v3subpath export was introduced in zod 3.25, butpackages/shadcn/package.jsondeclares"zod": "^3.24.1", allowing pnpm to resolvezod@3.24.1which does not have this export.The monorepo lockfile happens to resolve to
zod@3.25.76so it works in development, but the published npm package's^3.24.1range causespnpm dlxto pick3.24.1in a clean environment.Dependency chain
Fix
Bump the zod specifier from
^3.24.1to^3.25so the minimum resolved version always includes thezod/v3subpath export that MCP SDK requires.