Loading Depth Study
Preparing your workspace
A package manager installs, updates, removes, and tracks software dependencies used by a project.
Modern applications rarely contain every piece of functionality from scratch. Developers use reusable packages for routing, validation, database access, testing, UI components, and many other tasks. A package manager handles downloading these packages, resolving their dependencies, and recording which versions the project uses. npm is a common package manager in the JavaScript ecosystem, while other ecosystems use tools such as Composer, pip, Maven, and others.
A Next.js project can install a validation library through npm instead of manually copying the library into the source code.
npm install zod npm install npm uninstall zod npm update
The package manager adds, installs, removes, and updates project dependencies.