Lesson 8 / 30
Installing Packages
Install runtime and dev dependencies with npm, and commit package-lock.json for reproducible installs.
npm install
Add a runtime dependency, a dev-only tool, or install everything from an existing package.json.
npm install express # runtime dependency
npm install -D nodemon # devDependency
npm install # install everything from package.jsonnode_modules & the lockfile
Packages land in node_modules/. package-lock.json pins exact versions so every install is reproducible — commit it.