AI suggested a package. Check the exact name before installing.
Check the registry, project documentation and publisher together. A package that exists is not automatically the one the project intends you to use.
Pause before running a generated install command. Read the package’s exact spelling and any scope, then compare it with the project’s own installation guide. Do not ask the same AI to certify its suggestion as your only check.
Why this is a real concern
A USENIX Security 2025 paper studied nonexistent package recommendations in model-generated Python and JavaScript code. That is evidence of a documented failure mode, not a current failure rate for every coding assistant or proof that a particular package is malicious.
Look up metadata without installing
For a read-only example, we retrieved the registry record for esbuild version 0.25.10. Its name, version and repository fields were present. This older version is an inspection example, not a recommendation to install it. Compare those fields with the intended project and version.
Provenance answers a narrower question
npm provenance can link a published package to its source and build process. npm explicitly says this does not guarantee the absence of malicious code. Inspect the linked repository and exact source commit rather than treating a check mark as a complete safety review.
If the names or project links disagree
Stop and clarify the intended dependency. Save the proposed command for review, check the project’s documentation and use an isolated test environment when evaluation is appropriate. Do not replace a missing name with a similar-looking package just to make the command run.
Published October 13, 2026. The registry metadata lookup was read-only; we installed no package and performed no malware analysis. The cited study dates to 2025.
Sources: USENIX Security 2025 · package hallucinations · npm · provenance details · npm · provenance limits.