npm install <package-name>
npm install <package-name> --save-dev
npm update <package-name>
npm uninstall <package-name>
You need to add the 'express' package to a new Node.js project. Walk me through the exact command you would run and what files get changed.
After realizing that 'lodash' is no longer used, how would you remove it and ensure the project still runs correctly?
If you want to upgrade 'mongoose' to the latest minor version without changing the major version, what npm command would you use and why?
Your CI pipeline started failing after you ran 'npm update' on a shared library. How would you investigate the cause and decide whether to roll back or adjust the version range?
You have three microservices that each depend on 'axios' but at slightly different versions. How would you consolidate the dependency across the services while minimizing breakage?
Explain the trade‑offs between installing a testing tool as a devDependency versus a regular dependency in a production codebase.
Design a process for managing third‑party dependencies in a large monorepo, covering installation, version pinning, automated updates, and security scanning.
A transitive dependency of 'react-scripts' has a critical CVE, but the top‑level package hasn't released a fix yet. What steps would you take to mitigate the risk?
Compare npm's package-lock.json with npm shrinkwrap in the context of CI/CD pipelines for a high‑traffic service. Which would you choose and why?
Your organization wants to migrate from npm to pnpm across dozens of services. Outline the architectural considerations, migration steps, and how you'd ensure minimal disruption.
How would you establish organization‑wide policies for dependency updates, including automated pull requests, version range strategies, and audit compliance?
Describe how you would design an internal package registry to reduce external dependency risk and improve build reproducibility for all teams.