Installing Packages: dependencies vs devDependencies in Node.js
📖 Scenario: You are creating a simple Node.js project. You need to install packages that your project needs to run and packages that help you during development but are not needed when the project runs in production.
🎯 Goal: Learn how to install packages as dependencies and devDependencies using npm. Understand the difference and how to specify each type.
📋 What You'll Learn
Create a
package.json file for the projectInstall the package
express as a dependencyInstall the package
nodemon as a devDependencyVerify the
package.json lists express under dependenciesVerify the
package.json lists nodemon under devDependencies💡 Why This Matters
🌍 Real World
Most Node.js projects need to manage packages that are required to run the app and packages that help during development like testing or live reload tools.
💼 Career
Understanding how to manage dependencies and devDependencies is essential for working on professional Node.js projects and collaborating with teams.
Progress0 / 4 steps