Skip to content

Build Failure: Missing zod dependency in multiple packages (filesystem, gitlab, redis) #1589

@osmandredd

Description

@osmandredd

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 (in src/filesystem/dist/index.js)
  • @modelcontextprotocol/server-gitlab (in src/gitlab/index.ts and src/gitlab/schemas.ts)
  • @modelcontextprotocol/server-redis (in src/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 zod

After 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingserver-filesystemReference implementation for the Filesystem MCP server - src/filesystem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions