Skip to content

Conversation

@KKonstantinov
Copy link
Contributor

@KKonstantinov KKonstantinov commented Nov 16, 2025

Currently, on main, when npm install is ran:

npm warn ERESOLVE overriding peer dependency
npm warn While resolving: vite@7.2.2
npm warn Found: @types/node@22.8.1
npm warn node_modules/@types/node
npm warn   dev @types/node@"^22.0.2" from the root project
npm warn   13 more (@inquirer/confirm, @inquirer/core, @inquirer/type, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional @types/node@"^20.19.0 || >=22.12.0" from vite@7.2.2
npm warn node_modules/vitest/node_modules/vite
npm warn   vite@"^6.0.0 || ^7.0.0" from vitest@4.0.8
npm warn   node_modules/vitest
npm warn   1 more (@vitest/mocker)
npm warn
npm warn Conflicting peer dependency: @types/node@24.10.1
npm warn node_modules/@types/node
npm warn   peerOptional @types/node@"^20.19.0 || >=22.12.0" from vite@7.2.2
npm warn   node_modules/vitest/node_modules/vite
npm warn     vite@"^6.0.0 || ^7.0.0" from vitest@4.0.8
npm warn     node_modules/vitest
npm warn     1 more (@vitest/mocker)

Likely introduced by adding vitest, which relies on vite:

npm ls vite can show it:

@modelcontextprotocol/sdk@1.22.0 /........../modelcontextprotocol/typescript-sdk
├─┬ ajv@8.17.1 -> ./node_modules/.pnpm/ajv@8.17.1/node_modules/ajv
│ └─┬ rollup@4.53.2 invalid: "^2.79.1" from node_modules/.pnpm/ajv@8.17.1/node_modules/ajv, "^2.79.1" from node_modules/.pnpm/ajv@8.17.1/node_modules/ajv -> ./node_modules/.pnpm/rollup@4.53.2/node_modules/rollup
│   └── vite@7.2.2 -> ./node_modules/.pnpm/vite@7.2.2_@types+node@22.19.1_tsx@4.20.6/node_modules/vite
└─┬ vitest@4.0.9 invalid: "^3.1.3" from node_modules/.pnpm/eventsource-parser@3.0.6/node_modules/eventsource-parser, "^3.1.3" from node_modules/.pnpm/typescript-eslint@8.46.4_eslint@9.39.1_typescript@5.9.3/node_modules/typescript-eslint -> ./node_modules/.pnpm/vitest@4.0.9_@types+node@22.19.1_tsx@4.20.6/node_modules/vitest
  ├─┬ @vitest/mocker@4.0.9 -> ./node_modules/.pnpm/@vitest+mocker@4.0.9_vite@7.2.2_@types+node@22.19.1_tsx@4.20.6_/node_modules/@vitest/mocker
  │ └── vite@7.2.2 invalid: "^6.3.5" from node_modules/.pnpm/@vitest+mocker@4.0.9_vite@7.2.2_@types+node@22.19.1_tsx@4.20.6_/node_modules/@vitest/mocker -> ./node_modules/.pnpm/vite@7.2.2_@types+node@22.19.1_tsx@4.20.6/node_modules/vite
  └─┬ vite@7.2.2 -> ./node_modules/.pnpm/vite@7.2.2_@types+node@22.19.1_tsx@4.20.6/node_modules/vite
    └─┬ rollup@4.53.2 -> ./node_modules/.pnpm/rollup@4.53.2/node_modules/rollup
      └── vite@7.2.2 deduped -> ./node_modules/.pnpm/vite@7.2.2_@types+node@22.19.1_tsx@4.20.6/node_modules/vite

Motivation and Context

Vite’s peer types range: vite@7.2.2 (pulled by vitest) declares an optional peer @types/node of ^20.19.0 || >=22.12.0.
Current installed types: @types/node@22.8.1 does not satisfy >=22.12.0 (nor is it ^20.19.x), so npm reports a peer conflict and says it’s overriding.

Updated @types/node to the minimum required by vite, 22.12.0.

How Has This Been Tested?

npm install should bring up no warnings

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@KKonstantinov KKonstantinov requested a review from a team as a code owner November 16, 2025 20:27
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 16, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk@1121

commit: ad45ea3

Copy link
Contributor

@mattzcarey mattzcarey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@felixweinberger
Copy link
Contributor

Thanks!

@felixweinberger felixweinberger merged commit 55f02c0 into modelcontextprotocol:main Nov 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants