package.json and npm Commands — a practical guide to npm package.json with clear examples you can reuse in real projects.
package.json and npm Commands — 18/55 in the Node.js series. Full playlist companion: Node.js complete course on YouTube. Prefer one article? Read the complete Node.js tutorial.
Short description
`package.json` stores project metadata, scripts, and dependency lists. npm installs packages into `node_modules` and locks versions with a lockfile.
Common npm commands
npm init -y
npm install express
npm install nodemon --save-dev
npm uninstall lodash
npm run start
package.json scripts
{
"name": "my-app",
"scripts": {
"start": "node server.js",
"dev": "nodemon server.js"
}
}