npm, made simple.

New to the command line? You're in the right place.

Read top to bottom for a complete beginner path, or jump to the chapter you need. Every command has a one-click copy button and a "do it in VS Code" equivalent, so you can follow along whichever way you prefer.

All chapters

The first ten are the everyday essentials. The last few — marked Advanced — go further (publishing, monorepos, config, CI) and are optional.

01What is npm?

npm in plain English — what the Node Package Manager is, the giant registry of reusable code, and why almost every modern web project uses it.

02Install Node & npm

Install Node.js (which includes npm), check the versions, and set up the VS Code terminal so you can run commands where your project lives.

03package.json Explained

The file that defines your project: its name, scripts, and the exact packages it depends on. We walk through this site’s real package.json, field by field.

04Installing Packages

How npm install works, adding and removing packages, local vs global installs, and what the node_modules folder actually is (and why you never edit it).

05Dependencies vs devDependencies

Why packages are split into two lists — what your site needs to run versus the tools you only need while building it — using this project as the example.

06Running Scripts

npm run dev, build, preview and deploy — what each script in package.json does, the npm start / npm test shortcuts, and running them from VS Code.

07Versions & the Lockfile

Read version numbers like ^4.3.0, understand semantic versioning, and learn why package-lock.json keeps installs identical for everyone on the team.

08npx: Run Without Installing

Run a package’s command once without permanently installing it — what npx does, how it finds tools, and how it differs from a global install.

09Updating & Auditing

Keep packages current and safe: npm outdated, npm update, bumping a major version carefully, and fixing security warnings with npm audit.

10Fixing Common Problems

The reliable fixes for npm’s usual headaches: reinstalling cleanly, clearing the cache, Node version mismatches, permission errors and “module not found”.

11Publishing Your Own Package Advanced

Share your own code on npm: the fields a published package needs, scoped names, versioning with npm version, and publishing safely with a dry run.

12Workspaces & Monorepos Advanced

Keep several packages in one repository: npm workspaces, a single install for all of them, running scripts across packages, and when a monorepo is worth it.

13Configuring npm (.npmrc) Advanced

Change how npm behaves with npm config and .npmrc files: handy settings, pointing at a different registry, scoped registries, and keeping auth tokens safe.

14npm in CI/CD Advanced

Automate install, build and deploy: why CI uses npm ci, pinning the Node version, caching for speed, and a real GitHub Actions example that builds this kind of site.

15npm Cheat Sheet

A one-page reference: every command you’ll actually use, its VS Code equivalent, and what it does in plain English. Bookmark it.

Prefer the visual route? Almost everything below can be done from VS Code's built-in terminal and its NPM Scripts view — and every step shows you exactly where to click.