node_modules
ELI5 — The Vibe Check
node_modules is the folder where npm dumps all the packages you install. It can grow to hundreds of megabytes instantly and contains thousands of files. It is the source of endless memes. Never commit it to git — that's what lock files are for.
Real Talk
node_modules is the directory in a Node.js project where all installed npm packages and their transitive dependencies reside. It is generated by running npm install and should always be listed in .gitignore. It can contain thousands of nested packages.
Show Me The Code
# .gitignore
node_modules/
# Reinstall from lock file
rm -rf node_modules
npm ci
When You'll Hear This
"Delete node_modules and reinstall from scratch." / "Never commit node_modules — use the lock file instead."
Related Terms
Dependency
A dependency is a package your project relies on to work. Your app depends on React to render UI, axios to make requests, and dotenv to read config.
Lock File
A lock file is a snapshot of the exact versions of every package your project is using right now.
Package
A package is a bundle of code someone else wrote and published so you don't have to reinvent the wheel. Need to parse dates? There's a package for that.
Virtual Environment
A virtual environment is an isolated bubble for your Python project's packages.