memory: the README's Docker upgrade advice leaves the container with no index.js

未关闭 适合新手
#5,457 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
docker, typescript

调研方向

先查看 src/memory/README.md,检查其中描述的 Docker 构建和卷设置。选择一种升级方案,在保留 memory.jsonl 的同时确保容器运行新镜像中的代码,并说明现有数据的迁移步骤。使用已填充数据的 claude-memory 卷时,文档所述的升级能够正常运行,即为完成。

由索引模型根据 Issue 内容生成。

描述

documentation server-memory v2

Problem

src/memory/README.md ("Building") says:

For Awareness: a prior mcp/memory volume contains an index.js file that could be overwritten by the new container. If you are using a docker volume for storage, delete the old docker volume's index.js file before starting the new container.

Following it breaks the container instead of upgrading it. The documented setup mounts the named volume claude-memory over /app/dist, the image's code directory. Docker seeds a named volume from the image only while the volume is empty, so once the volume holds memory.jsonl the image's new dist/ is never copied in: deleting index.js leaves /app/dist with no entry point.

The reverse holds too: as long as index.js stays in the volume, every newer image keeps running the code from the first image that populated it. #5346 (closed, not planned) noted that shadowing while deciding to keep the default graph location.

Reproduce

Found while verifying #5345, with both the v2/main image and the #5345 image:

docker build -f src/memory/Dockerfile -t mcp/memory .
# create a graph so the volume is non-empty, then follow the README:
docker run --rm -v claude-memory:/v alpine rm /v/index.js /v/version.js
docker run -i --rm -v claude-memory:/app/dist mcp/memory
# node:internal/modules/cjs/loader ... Cannot find module '/app/dist/index.js'

Expected

The README gives upgrade advice that works. Delete the volume's *.js files and copy the new image's dist/*.js into the volume, keeping memory.jsonl. Or point Docker users at a volume on its own directory with MEMORY_FILE_PATH, and explain how to move an existing memory.jsonl there. The second option does not change the server's default, which #5346 kept.

主要语言
TypeScript
星标
91.7k
派生
11.9k
平均合并
3 小时 48 分钟
30 天内合并 PR
180

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/servers 的其他 Issue

查看 modelcontextprotocol/servers 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。