What is npm (Node Package Manager)?

Turkish: npm

npm is the Node.js package ecosystem that manages JavaScript dependencies through a registry, CLI, package.json, and lock files.

What is npm?

npm is the package manager and registry used in the JavaScript ecosystem for publishing packages, installing dependencies, and running project scripts. It ships with Node.js, and many frontend, backend, testing, build, and automation tools are distributed as npm packages.

A project defines its dependencies and commands in package.json. Lock files such as package-lock.json help the same dependency versions install across developer machines and CI environments.

How npm is Used

  • npm install: Installs project dependencies.
  • npm install <package>: Adds a new package to the project.
  • npm run <script>: Runs a script defined in package.json.
  • npm publish: Publishes a package to the npm registry.
  • npm audit: Checks dependencies against known security advisories.

npm is not only a download tool; it also standardizes build, test, lint, preview, and deploy commands in a project lifecycle.

Business Use

In Node.js projects, npm helps teams use the same toolchain. Vite, TypeScript, ESLint, testing frameworks, and UI libraries are commonly added through npm.

In enterprise projects, dependency management is a security concern. Package source, license, maintenance status, and transitive dependency chains should be tracked. Private registries, lock files, regular updates, and CI checks make npm usage more controlled.