Package Exports
- node-modules-counter
- node-modules-counter/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-modules-counter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
📦 node-modules-counter

A hilarious CLI tool that counts the number of packages in your node_modules directory and judges you for it. Because every developer needs a little shame in their life.
🎉 Features
- Lightning-fast counting - Instantly tells you how bloated your project is
- Witty commentary - Get roasted based on your package count
- Global installation - Run from anywhere with
count-modules - Cross-platform - Works on macOS, Linux, and Windows
- Built with TypeScript - Type-safe chaos
📊 What You'll Get
Run the command and receive:
- Total package count in your
node_modules - Motivational (or demotivational) messages based on your situation
- A laugh at how far JavaScript dependency culture has gone
📦 Installation
Install globally via npm:
npm install -g node-modules-counterOr use it directly with npx:
npx node-modules-counter🚀 Usage
Navigate to any project directory and run:
count-modulesExample Output
🎉 You have 1247 packages in node_modules! 🎉
😱 This is INSANITY! Maybe it's time for a dependency detox?📈 What the Messages Mean
- 1-100 packages:
✨ Minimalist project - respect! - 100-500 packages:
👍 Pretty normal for JavaScript! - 500-1000 packages:
🤔 That's a lot... but could be worse! - 1000+ packages:
😱 This is INSANITY! Maybe it's time for a dependency detox?
🛠️ Development
Prerequisites
- Node.js 16+
- npm or yarn
Setup
Clone the repository and install dependencies:
git clone <repository-url>
cd node-modules-counter
npm installBuild
Compile TypeScript to JavaScript:
npm run buildTest Locally
Link the package globally for local testing:
npm link
count-modulesUnlink
When you're done testing:
npm unlink -g node-modules-counterProject Structure
node-modules-counter/
├── src/
│ └── index.ts # Main CLI logic
├── dist/ # Compiled JavaScript (generated)
├── package.json # Project metadata
├── tsconfig.json # TypeScript configuration
└── README.md # This fileWhy No Bundler?
This project intentionally uses no bundler (no Webpack, Vite, or Parcel). Here's why:
- Simplicity: Direct TypeScript compilation is faster and easier to maintain
- Performance: No unnecessary build complexity for a simple CLI tool
- Minimal dependencies: Fewer dependencies = fewer problems
- Transparency: Your code is clear and understandable
How It Works
The tool:
- Finds your project's
node_modulesdirectory - Counts all subdirectories (packages)
- Displays the total with witty commentary
- Silently judges your dependency choices
Troubleshooting
command not found: count-modules
Make sure the package is installed globally:
npm list -g node-modules-counterIf not installed, install it:
npm install -g node-modules-counterNo node_modules found
The command searches for node_modules in the current working directory. Make sure you're running it in a Node.js project.
Contributing
Found a bug? Have a hilarious message idea? Feel free to open an issue or submit a pull request!
License
MIT License - Use it, modify it, share it. Just don't blame me for your dependency crisis.
Disclaimer
This tool provides no actual solutions to JavaScript dependency bloat. It merely reflects your reality back at you with humor. For real solutions, consider:
- Using
npm pruneto remove unused dependencies - Switching to
pnpmfor better package management - Questioning your life choices when adding the 47th utility library
Made with ❤️ (and probably too many dependencies)