Manage project dependencies and run scripts with npm.
npm (Node Package Manager) is the world's largest software registry and the default package manager for the JavaScript runtime environment Node.js. It consists of two main parts: a command-line interface (CLI) tool for interacting with the registry, and the online registry itself where developers can publish and share open-source JavaScript packages. For a developer, npm is an indispensable tool for managing a project's dependencies. Every project typically has a `package.json` file in its root directory. This file serves as a manifest for the project, containing metadata (like the project's name and version) and, most importantly, listing all the third-party libraries (dependencies) that the project needs to run. By running the command `npm install`, npm reads this file and downloads the specified packages into a `node_modules` folder. npm is also used to run scripts defined in the `scripts` section of `package.json`. This provides a convenient way to define and run common tasks for your project, such as starting a development server (`npm run dev`), running tests (`npm test`), or building the project for production (`npm run build`). Understanding how to use npm to install packages and manage scripts is a fundamental skill for any modern JavaScript developer.