npm-install-size

Check the published install size of any NPM packageโ€”before you install it.
Or see the actual installed size after install with --installed.

npm version GitHub stars
Get Started
Note: npm-install-size can show both the published npm package size (the files you would get from the registry, before install) and the actual disk usage after installation in node_modules (with --installed).

Features

๐Ÿ“ฆ

Analyze install size of any npm package

๐Ÿ—‚๏ธ

Supports local paths & monorepo workspaces

๐ŸŒณ

Dependency tree, minified/gzipped, file type breakdown

โšก

Compare, history, badge, and interactive modes

๐Ÿ“

JSON, CSV, Markdown, and human-readable output

๐Ÿ”Œ

Programmatic API for Node.js

โš™๏ธ

Config file support

๐Ÿš€

No install required: npx npm-install-size <package>

๐Ÿ’พ

Show actual installed size of node_modules or a specific package (--installed)

Quick Usage

$ npx npm-install-size react express lodash
๐Ÿ“ฆ react@19.1.0: 167 kB
๐Ÿ“ฆ express@5.1.0: 197 kB
๐Ÿ“ฆ lodash@4.17.21: 1.41 MB
$ npx npm-install-size --installed
โš ๏ธ  This is the actual installed size on disk, including all dependencies. It may be much larger than the published tarball size.
๐Ÿ“ฆ node_modules: 132 MB
$ npx npm-install-size --installed express
โš ๏ธ  This is the actual installed size on disk, including all dependencies. It may be much larger than the published tarball size.
๐Ÿ“ฆ node_modules/express: 1.2 MB

See full usage & docs on GitHub.

FAQ

Q: Does this show the size after install?
A: By default, it shows the size of the published package tarball, not the full node_modules disk usage. But you can use --installed to see the actual installed size of node_modules or a specific package.
Q: Can I see the size after install?
A: Yes! Use --installed to see the actual disk usage of node_modules or a specific package.