Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`dependencies is not iterable` / `Cannot read property 'reduce' of undefined`: `FileStore` serves zero-prefixed cache files as hits

Đang mở
#1,961 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
build-system

Hướng nghiên cứu

Start with FileStore.get and Transformer.transformFile, which the report identifies as the cache-read and transform entry points. Trace how zero-prefixed files become cache hits and review the related cache or transform tests. Done means an invalid cached transform is treated as a miss and replaced, without the reported dependencies error.

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

Mô tả

This is a transform cache bug with a reliable reproduction on Windows NTFS in particular.

FileStore.get returns any file starting with a null byte as a Buffer (that's how set marks Buffer values), so a zero-prefixed cache file is a truthy hit. Transformer.transformFile uses it without validating content, and the build fails with dependencies is not iterable (Cannot read property 'reduce' of undefined on older versions) until the cache is cleared.

This is a symptom of power loss on NTFS - the file length is journalled but the data isn't flushed, so a subsequent read comes back full of nulls (e.g. https://github.com/coollabsio/jean/issues/679). That fits the reports, all on Windows:

We should treat a cached value that isn't a valid transform result as a miss, and overwrite it.

Ngôn ngữ chính
JavaScript
Star
5.6k
Fork
696
Merge trung bình
2 ngày 7 giờ
Pull request đã merge (30 ngày)
28

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 react/metro

Tất cả issue của react/metro

Issue tương tự

Thêm issue về JavaScript

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.