1You 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.
2After realizing that 'lodash' is no longer used, how would you remove it and ensure the project still runs correctly?
3If you want to upgrade 'mongoose' to the latest minor version without changing the major version, what npm command would you use and why?
2-5 years experience
1Your 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?
2You 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?
3Explain the trade‑offs between installing a testing tool as a devDependency versus a regular dependency in a production codebase.
5-8 years experience
1Design a process for managing third‑party dependencies in a large monorepo, covering installation, version pinning, automated updates, and security scanning.
2A 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?
3Compare 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?
8+ years experience
1Your 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.
2How would you establish organization‑wide policies for dependency updates, including automated pull requests, version range strategies, and audit compliance?
3Describe how you would design an internal package registry to reduce external dependency risk and improve build reproducibility for all teams.
Follow-up Questions
What does the ^ symbol mean in a version range?
How do lockfiles affect reproducible builds?
When would you prefer a devDependency over a regular dependency?
Sharethis question
Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.