Free — no signup required

Introduction: When "npm run build" Isn't Enough

2 min read

The Growing Pain

When you are working on a small project, running a build command like go build, npm run build, or even a simple Makefile works great. It takes a few seconds, and you get your runnable application. The build tool reads your source files, invokes a compiler, and produces an artifact. Simple, fast, done.

But imagine you are at a company like Google, Facebook, or Twitter.

  • You have millions of lines of code across thousands of packages.
  • You have thousands of developers committing code simultaneously, often to the same repository.
  • Your code spans multiple languages — C++ backends, Java microservices, iOS apps, JavaScript frontends — all depending on each other through a web of shared libraries.
  • All of this code lives in one giant repository, called a Monorepo (short for monolithic repository).

In this scenario, a naive make all might take hours. Worse, it might succeed on your laptop but fail on your colleague's machine because they have a different version of a system library installed — or a different version of Python on their $PATH. The build is not reproducible, and debugging it becomes a nightmare.

The Need for Specialized Tools

At this scale, standard build tools break down for three reasons: they are too slow (they rebuild everything), they are not reproducible (they depend on the host environment), and they do not understand the full dependency graph (they cannot tell you what is safe to skip). Tools like Bazel (open-sourced from Google's internal Blaze), Buck (from Facebook), and Pants (from Twitter/Foursquare) were created to solve exactly these problems. They introduce three foundational concepts — hermeticity, fine-grained dependency graphs, and remote execution — to keep developer productivity high even as the codebase grows to enormous scale.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free