Junior From PDF Node.js Node.js

What is the difference between dependencies and devDependencies?

Short answer: dependencies: These are required for your app to run in production. πŸ“Œ

Example code

express, mongoose devDependencies: Only needed during development (testing, building, linting). πŸ“Œ Example: nodemon, eslint, jest πŸ“¦ These are defined in package.json: "dependencies": { "express": "^4.18.0" }, "devDependencies": { "nodemon": "^3.0.0" } βœ… Install a dev dependency with: npm install nodemon --save-dev

Say this in the interview

  1. Define β€” one clear sentence (the short answer above).
  2. Example β€” relate it to a project like ShopNest or your real work.
  3. Trade-off β€” when you would not use it.
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content onlyβ€”not admin or internal tools.

care@toolliyo.com

Need callback? Share your details