This is a tool (CLI + interactive UI) for inspecting the node_modules directory of a JavaScript/TypeScript project, created by Anthony Fu. It supports projects using npm, pnpm or bun. The idea is to help developers visualise the dependency graph, see which dependencies are installed, their sizes, types (ESM vs CJS), origins (catalog vs registry), and filter or build a static report of a project’s dependency tree. The project includes a web UI version that you can try at node-modules.dev, and a build command to generate a static output (folder .node-modules-inspector) for hosting. It supports configuration via node-modules-inspector.config.ts for customizing filters and display settings. Internally it uses a web version with WebContainer to run in-browser installations for live project visualisations. It’s especially useful for large monorepos or complex dependency trees where understanding size, duplication or unused packages is critical.
Features
- CLI command npx node-modules-inspector to launch the UI for your project’s node_modules
- Interactive visualisation of dependencies: tree, size, module type, duplicates
- Static build support: build command to export report for hosting/share
- Custom configuration support (node-modules-inspector.config.ts) with filters and settings
- Browser‐based version (via WebContainer) for in-browser inspection without installing locally
- Supports npm, pnpm, bun projects for broad package manager compatibility