Skip to main content
Ganesh Joshi
Back to Cheatsheets

npm scripts

Updated 2026-02-09

Common npm script commands and package.json lifecycle scripts. Run, build, test, and lint from the CLI.

Lifecycle

  • npm run start

    Usually runs app (e.g. next start).

  • npm run build

    Production build.

  • npm run dev

    Development server.

  • npm test

    Run tests (or npm run test).

  • npm run lint

    Lint code.

Common scripts

  • npm install

    Install dependencies.

  • npm ci

    Clean install from lockfile.

  • npm run clean

    Often removes build/output (project-specific).

  • npm run typecheck

    TypeScript check (if defined).

npm scripts | Cheatsheet | Ganesh Joshi