Skip to content

fix(docker): upgrade npm in TypeScript builders - #4832

Open
lyxnbclass wants to merge 1 commit into
modelcontextprotocol:mainfrom
lyxnbclass:fix/4782-docker-npm-arborist
Open

lyxnbclass wants to merge 1 commit into
modelcontextprotocol:mainfrom
lyxnbclass:fix/4782-docker-npm-arborist

Conversation

@lyxnbclass

Copy link
Copy Markdown

Description

Upgrade npm in the four TypeScript Docker builder stages before installing package dependencies. The builder images bundle npm 10.x, whose Arborist resolver crashes on the current Vitest peer dependency graph.

Server Details

  • Server: everything, filesystem, memory, sequentialthinking
  • Changes to: Docker build dependency installation

Motivation and Context

Fixes #4782.

npm 10.9.0 and npm 11.5.1 both reproduce Cannot read properties of null (reading 'edgesOut'). npm 11.12.1 resolves the same dependency graph successfully. The chosen npm@^11.5.1 range matches the repository's existing release workflow.

How Has This Been Tested?

  • Installed each server independently with npm 11.12.1; all four prepare builds completed.
  • npm test in src/everything: 107 tests passed.
  • npm test in src/filesystem: 168 tests passed.
  • npm test in src/memory: 87 tests passed.
  • npm test in src/sequentialthinking: 26 tests passed.
  • Docker image builds were not run because the local Docker daemon was unavailable.

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 Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

This overlaps with #4787, which was discovered after the local implementation was complete. This version keeps the npm upgrade and dependency install in the existing cache-mounted layer.

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.

docker build fails for all 4 TypeScript servers: npm install crashes with "Cannot read properties of null (reading 'edgesOut')"

1 participant