Skip to content
Preptima
mediumConceptMidSeniorStaff

You add one small npm package to a service. What have you just taken on?

5 min readUpdated 2026-08-15Target archetype: Big Tech, Enterprise Captive, Product Startup

Answer

Short answer

Not one package but its whole transitive closure, install-time scripts from every node in it, a build that now depends on the registry being reachable, and the possibility of two resolved copies of the same library whose instances fail each other's identity checks.

Was this answer helpful?

Likely follow-ups

  • Your lockfile pins every version and a fresh install still yields a different tree. How is that possible?
  • A module resolves at runtime that nothing in your package.json declares. What made that work, and why will it stop?
  • How would you make your build succeed with the registry unreachable for an hour?
  • What changes when the dependency ships both a CommonJS and an ESM entry point?

Related questions

Further reading

Related Topics