modelcontextprotocol / modelcontextprotocol/servers

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

Open
#4,782 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
90.5k
Forks
11.7k
Avg merge
2d 2h
Merged PRs (30d)
5

Description

Describe the bug

docker build -f src/<server>/Dockerfile . currently fails at the npm install step for all four TypeScript servers (everything, filesystem, memory, sequentialthinking), with:

npm error Cannot read properties of null (reading 'edgesOut')

Reproduced on unmodified main (verified against a fresh git archive upstream/main) with a fully cleared build cache (docker builder prune -f + --no-cache), so this isn't stale-cache-mount noise.

Root cause (bisected)

Installing just the everything server's runtime dependencies succeeds:

{
  "dependencies": {
    "@modelcontextprotocol/sdk": "^1.30.0",
    "cors": "^2.8.5",
    "express": "^5.2.1",
    "jszip": "^3.10.1",
    "zod": "^4.0.0"
  }
}

Adding the devDependencies back reproduces the crash:

{
  "devDependencies": {
    "@types/cors": "^2.8.19",
    "@types/express": "^5.0.6",
    "@vitest/coverage-v8": "^4.1.8",
    "prettier": "^2.8.8",
    "shx": "^0.4.0",
    "typescript": "^5.6.2",
    "vitest": "^4.1.8"
  }
}

I didn't bisect further within the dev set (my money's on @vitest/coverage-v8's dependency tree, since that's a common trigger for this class of npm arborist bug, but haven't confirmed which specific package). Since the four Dockerfiles' builder stages all run a plain npm install (not --omit-dev/--production), all four hit the same dev-dependency resolution and fail identically — confirmed for everything and filesystem directly; memory and sequentialthinking share the same builder pattern and dependency shape so are very likely affected too.

A minimal npm install with just express on the same base image (node:22.12-alpine, npm 10.9.0) succeeds fine, so this isn't a generic npm/Alpine/environment problem — it's specific to this dependency graph.

To Reproduce

git clone https://github.com/modelcontextprotocol/servers
cd servers
docker build -f src/everything/Dockerfile .
# or: docker build -f src/filesystem/Dockerfile .

Expected behavior

docker build succeeds per the commands documented in each server's README.

Environment

  • Docker Desktop 29.7.2, Windows
  • Base image: node:22.12-alpine (bundled npm 10.9.0)
  • Reproduced on main as of this report

🤖 Generated with Claude Code

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running docker build -f src/everything/Dockerfile . and src/filesystem/Dockerfile . with the cleared-cache steps described in the issue. Compare npm install with only dependencies versus the listed devDependencies, then inspect the four server Dockerfiles and dependency manifests. Done means the documented Docker builds succeed for everything, filesystem, memory, and sequentialthinking.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, node.js, typescript
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.