Skip to content

## 🚨 [Critical/Housekeeping] node_modules/ directory is committed to the repository β€” inflates clone size by hundreds of MB and breaks standard npm workflow for all 11 forksΒ #115

Description

@prince-pokharna

Summary

The repository root contains a committed node_modules/ directory. This is one of the most critical anti-patterns in Node.js development and should never be version-controlled.

Confirmed impact:

  • node_modules/ can contain hundreds to thousands of packages totalling hundreds of megabytes
  • Every git clone for all 11 forks downloads this entire directory unnecessarily
  • With 119 commits, multiple snapshots of node_modules/ may exist in git history, compounding the bloat
  • npm install behavior is unpredictable when node_modules/ already exists from git
  • Turborepo's workspace resolution may behave unexpectedly with committed node_modules

Why this likely happened:
.gitignore at the root may not be ignoring the root-level node_modules/, or the directory was force-added at some point.

Proposed Fix

Step 1 β€” Remove from tracking:

git rm -r --cached node_modules/

Step 2 β€” Verify .gitignore includes:
node_modules/
**/node_modules/
.turbo/

Step 3 β€” Clean git history (important β€” the large binary files remain in history even after removal):

# Using git-filter-repo (recommended):
git filter-repo --path node_modules/ --invert-paths

Step 4 β€” Update README to note that contributors must run npm install after cloning.

Acceptance Criteria

  • node_modules/ removed from git tracking via git rm --cached
  • .gitignore updated to prevent re-committing at root and all workspace levels
  • Repository size measurably reduced after removal
  • npm install from root works correctly after removal

Labels: housekeeping, priority: critical, good first issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions