Skip to content

[BUG] error TS2589: Type instantiation is excessively deep and possibly infinite. #1313

@yury-s

Description

@yury-s

Describe the bug
tsc starts OOM'ing when bumping @modelcontextprotocol/sdk dependency version 1.17.5-> 1.25.1

To Reproduce
Steps to reproduce the behavior:

  1. git clone git@github.com:microsoft/playwright.git
  2. npm install
  3. npx tsc -p .
  4. See no errors.
  5. Update @modelcontextprotocol/sdk dependency version 1.17.5-> 1.25.1 in package.json
  6. npm i
  7. npx tsc -p .
  8. The compiler takes a long a time to run and eventually crashes with OOM in v8.

Expected behavior
No errors.

Additional context
When running tsc for tests, it triggered these errors

[7] tests/mcp/browser.eval.ts(40,19): error TS2589: Type instantiation is excessively deep and possibly infinite.
[7] tests/mcp/browser.eval.ts(40,35): error TS2589: Type instantiation is excessively deep and possibly infinite.

Here is the PR microsoft/playwright#38581 that exposed the error on the bot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions