Skip to content
Justice Tech School

npm Commands

npm init, install, run, update, outdated and ci manage packages. package.json describes the project.

Example
const pkg = { name: "demo", version: "1.0.0", scripts: { start: "node app.js", test: "node --test" }, dependencies: { express: "^4.19.0" } };
console.log(JSON.stringify(pkg, null, 2));

Result

{
  "name": "demo",
  "version": "1.0.0",
  "scripts": {
    "start": "node app.js",
    "test": "node --test"
  },
  "dependencies": {
    "express": "^4.19.0"
  }
}

Exercise

Run a script.

npm  start

Quiz Test

What does npm ci do?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.