-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
Problem:
When running the build process for the workspace (e.g., via pnpm install which triggers the prepare script, or directly with pnpm run -r build), the build fails with TypeScript errors in several packages.
Error:
The primary error observed in the build logs for the affected packages is:
error TS2307: Cannot find module 'zod' or its corresponding type declarations.
Affected Packages:
This error occurs because the zod library is imported and used within the following packages, but it is not declared as a dependency in their respective package.json files:
@modelcontextprotocol/server-filesystem(insrc/filesystem/dist/index.js)@modelcontextprotocol/server-gitlab(insrc/gitlab/index.tsandsrc/gitlab/schemas.ts)@modelcontextprotocol/server-redis(insrc/redis/src/index.ts)
Proposed Solution:
Add zod as an explicit dependency to each of the affected packages. This can be done using the following pnpm commands from the workspace root:
pnpm --filter @modelcontextprotocol/server-filesystem add zod
pnpm --filter @modelcontextprotocol/server-gitlab add zod
pnpm --filter @modelcontextprotocol/server-redis add zodAfter running these commands and updating the pnpm-lock.yaml (e.g., by running pnpm install), the build process should successfully compile these packages.
Environment:
- Discovered while setting up the repository using pnpm v10.9.0.
Adding these dependencies should resolve the build failures related to zod.