---
title: "node_modules · MacMelon"
description: "node_modules holds a JavaScript project's installed packages. It can be recreated from the lockfile. It is not the same folder as the npm cache."
url: "https://macmelon.com/glossary/node-modules"
---

# node\_modules

The folder where a JavaScript project keeps its installed dependencies.

npm, pnpm, and Yarn install a project's packages into node\_modules. The folder is local to that project, which means a machine with many checkouts holds many copies. Given the lockfile, the package manager can recreate it. Without the lockfile, you only have whatever was declared in the manifest, which is a weaker promise.

node\_modules is not the npm cache. The cache stores tarballs for reuse. The project folder stores the unpacked tree the tools import. [Disk Housekeeper](https://macmelon.com/apps/disk-housekeeper) Smart Clean can include node\_modules and previews the paths before removal. The walkthrough is [Delete node\_modules safely](https://macmelon.com/use-cases/delete-node-modules-safely).

## Apps

[Make room for what matters. Clear clutter with confidence. ### Disk Housekeeper](https://macmelon.com/apps/disk-housekeeper)

## Related guides

[### How to clean developer files on macOS](https://macmelon.com/guides/how-to-clean-developer-files-on-macos)

## Related use cases

[### Delete node\_modules safely](https://macmelon.com/use-cases/delete-node-modules-safely)[### Clean npm, Gradle, and Cargo caches](https://macmelon.com/use-cases/clean-developer-caches)[### When VS Code or Cursor slows your Mac](https://macmelon.com/use-cases/vs-code-or-cursor-slowing-your-mac)

## Related terms

[npm's on-disk store of package tarballs, reused by later installs. ### npm cache](https://macmelon.com/glossary/npm-cache)[Files a developer tool keeps so the next build or install can skip a download or a compile. ### Developer cache](https://macmelon.com/glossary/developer-cache)[The holding area macOS uses for files you have deleted but not yet erased. ### Trash](https://macmelon.com/glossary/trash)[The background process that gives a code editor autocomplete, go-to-definition, and error checking for a language. ### Language server](https://macmelon.com/glossary/language-server)
