Skip to content

bug(ai-mcp): CLI fails on startup #753

@jan-kubica

Description

@jan-kubica

TanStack AI version

@tanstack/ai-mcp v0.1.0, @tanstack/ai v0.28.0

Framework/Library version

Node.js v22.22.3 (StackBlitz WebContainer). Also reproduced locally: Node v20.20.2, v22.22.3, and v26.3.0.

Describe the bug and the steps to reproduce it

The published @tanstack/ai-mcp CLI fails during module startup before it can print help or run codegen. See below minimal Stackblitz repro, or:

npm install @tanstack/ai-mcp@0.1.0
npx tanstack-ai-mcp --help

Error: Dynamic require of "fs" is not supported
at .../node_modules/@tanstack/ai-mcp/dist/bin/chunk-LMMQX4CK.js
at .../json-schema-to-typescript/dist/src/index.js

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://stackblitz.com/edit/tikmu3cu?file=README.md,package.json&terminalHeight=50

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Maybe, I'll investigate and start debugging

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions