Junior From PDF Node.js Node.js

What is the difference between dependencies and devDependencies?

  • dependencies: These are required for your app to run in production.

๐Ÿ“Œ Example: 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

More from Node.js Tutorial

All questions for this course
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