Skip to content

Fix phantom dependencies #575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johnny-y-wang
Copy link

@johnny-y-wang johnny-y-wang commented May 30, 2025

Add phantom dependencies into package.json to enable pnpm (and other strict hoisting package manager) to build successfully. Fixes #572

Motivation and Context

While this repo doesn't use pnpm or yarn, many of us import this into our monorepo and depend on strict dependency management. This enables modelcontextprotocol/typescript-sdk to be included without monkeypatching.

How Has This Been Tested?

Run pnpm install && pnpm build

Breaking Changes

None

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

@johnny-y-wang
Copy link
Author

@bhosmer-ant PTAL, thanks!

@keviddles
Copy link

I tested this and can confirm this PR fixes #572. Thank you @johnny-y-wang

Copy link
Contributor

@ihrpr ihrpr left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this issues, have a question about the express upgrade

@@ -66,12 +66,14 @@
"@types/cross-spawn": "^6.0.6",
"@types/eslint__js": "^8.42.3",
"@types/eventsource": "^1.1.15",
"@types/express": "^5.0.0",
"@types/express": "^5.0.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need to update the version here?

Copy link
Author

Choose a reason for hiding this comment

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

To align with express versioning and make TypeScript happy. (Granted that express needs to be bumped too, but I haven't done that.)

Copy link
Author

@johnny-y-wang johnny-y-wang left a comment

Choose a reason for hiding this comment

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

@ihrpr see inline

@@ -66,12 +66,14 @@
"@types/cross-spawn": "^6.0.6",
"@types/eslint__js": "^8.42.3",
"@types/eventsource": "^1.1.15",
"@types/express": "^5.0.0",
"@types/express": "^5.0.2",
Copy link
Author

Choose a reason for hiding this comment

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

To align with express versioning and make TypeScript happy. (Granted that express needs to be bumped too, but I haven't done that.)

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.

pnpm fails to build
3 participants