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

Đang mở Phù hợp với người mới
#5,457 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, typescript
Lĩnh vực
devops, documentation

Hướng nghiên cứu

Bắt đầu với src/memory/README.md và kiểm tra cấu hình build Docker cùng volume được mô tả trong đó. Chọn lộ trình nâng cấp giữ nguyên memory.jsonl đồng thời bảo đảm container chạy mã của image mới, và giải thích các bước di chuyển dữ liệu hiện có. Hoàn tất khi quy trình nâng cấp được mô tả hoạt động với volume claude-memory đã có dữ liệu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
91.7k
Fork
11.9k
Merge trung bình
3 giờ 48 phút
Pull request đã merge (30 ngày)
180

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/servers

Tất cả issue của modelcontextprotocol/servers

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.