Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#1,961 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@kkkhs is already working on this.

Since Sep 24, 2026.

  • #1966 by @kkkhs — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
build-system

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
JavaScript
Stars
5.6k
Forks
699
Avg merge
2d 19h
Merged PRs (30d)
34

Getting set up

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.

More from react/metro

All issues in react/metro

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.