Suggest an editImprove this articleRefine the answer for “What does node_modules store?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**`node_modules`** is the folder where npm (or yarn/pnpm) stores *all of a project's installed dependencies*, along with their nested dependencies. **Key point:** this folder is usually added to `.gitignore` because it can easily be restored with the `npm install` command.Shown above the full answer for quick recall.Answer (EN)Image`node_modules` is the folder where npm (or yarn/pnpm) stores *all of a project's installed dependencies*, along with their nested dependencies. --- ### What exactly is in there 1. **Core dependencies from** `package.json` **(**`dependencies` **and** `devDependencies`**)** Every installed package ends up in `node_modules`. 2. **Nested dependencies** If your library depends on another library, that one gets installed inside `node_modules` too, even if you never listed it directly. 3. **Compiled artifacts** Some packages contain compiled binary files (for example, for Node modules written in C/C++). 4. **npm ecosystem service files** For example, `.bin`, a folder with executable files for CLI packages. --- ### Notable traits - **A large structure** `node_modules` can take up hundreds of megabytes or even gigabytes because of nested dependencies. - **Not stored in the repository** This folder is usually added to `.gitignore`, because it is easily restored with the command: ```bash npm install ``` - **Readability is secondary** The folder is not meant for manual editing, it is npm's internal structure. --- ### Summary `node_modules` stores *the full set of libraries a project needs to run*, including their nested dependencies and service files. It is effectively an "installed version of the ecosystem", built from the data in `package.json` and `package-lock.json`.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.