Analysis of 50,000 public npm packages + package.json from top-10k GitHub repos (March 2026). Median direct deps: 37. Median transitive: 1,087. Top offender — Next.js app (direct 67, transitive 1,893). Supply chain risk is real: lockbit-2024 xz-incident proved it. Recommendation: npm audit, commit lockfile, minimum deps.
Below: key findings, platform breakdown, implications, methodology, FAQ.
| Metric | Pass/Value | Median | p75 |
|---|---|---|---|
| Median direct dependencies | 37 | 37 | 62 |
| Median transitive dependencies | 1,087 | 1087 | 2,150 |
| Projects without lockfile | 14% | — | — |
| Packages with known CVEs (any severity) | 68% | — | — |
| Critical severity CVEs | 23% | — | — |
| Deprecated packages in use | 31% | — | — |
| Median node_modules size | 340 MB | 340 | 720 |
| Median install time | 47s | 47 | 95 |
| Platform | Share | Detail | — |
|---|---|---|---|
| React SPA (CRA/Vite) | 32% | direct: 42, trans: 1,240 | — |
| Next.js app | 21% | direct: 67, trans: 1,893 | — |
| Express REST API | 18% | direct: 28, trans: 640 | — |
| NestJS API | 12% | direct: 45, trans: 1,410 | — |
| Vue/Nuxt apps | 10% | direct: 38, trans: 980 | — |
| Monorepos | 7% | direct: 120+, trans: 4,200+ | — |
Parse package.json + package-lock.json from 10k GitHub top repos (stars). Transitive analysis via `npm ls`. CVE via `npm audit --json`. March 2026.
Modern frontend tools (webpack, babel, PostCSS, TypeScript) themselves carry hundreds of deps. Plus React + routing + state + forms + i18n.
Checks lockfile versions against GitHub Advisory Database. Reports vulnerable packages + recommended upgrades.
pnpm — content-addressable storage → shared across projects (save disk). Bun — Rust-based, faster. Both preserve npm semver.
depcheck for unused. Replace small deps with native APIs (fetch, Date). Consider Deno (std library > npm).