Turborepo is a high-performance build system for JavaScript and TypeScript monorepos, designed to optimize development workflows for large codebases. The current stable version is 2.9.6, with active development and frequent patch/minor releases. Written in Rust, it stands out with features like incremental builds, content-aware local and remote caching, and parallel task execution, ensuring that only necessary work is recomputed. It integrates seamlessly with Vercel for distributed caching. Turborepo aims to simplify the complexities of monorepo management, offering significant speed improvements for build and test pipelines by efficiently orchestrating tasks based on a dependency graph.
npm install turbo-linux-mips64leVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a new Turborepo monorepo, install dependencies, and run common tasks like `build` and `dev` across workspaces, using `create-turbo` and the `turbo run` CLI command.
Run `npx @turbo/codemod migrate` to automatically update your configuration files. Review the official migration guide for specific changes to `turbo.json` and `turbo run` commands, especially regarding environment variables and package manager requirements.
Generate a dedicated Turborepo token from your Vercel Dashboard -> Settings -> Tokens. Ensure `TURBO_TOKEN` and `TURBO_TEAM` are correctly set in your CI environment variables.
Explicitly declare all output files/directories for each task in the `outputs` array within your `turbo.json`'s `tasks` configuration. For tasks that produce no files (e.g., `lint`), specify an empty array `[]`.
Carefully define `inputs` in `turbo.json` to only hash critical files (`src/`, `package.json`). Exclude volatile files using glob negations (e.g., `!node_modules/.cache/**`).
Add the `packageManager` field to your root `package.json` with the correct package manager and version used in your monorepo. For example: `"packageManager": "npm@10.8.1"`.
Refactor your package architecture to eliminate circular dependencies. A common solution is to extract shared types or utilities into a new, independent package that both previously interdependent packages can consume.
Ensure `workspaces` array is correctly defined in your root `package.json`. Run `npm install`, `pnpm install`, or `yarn install` from the monorepo root to properly link packages. For ESM, verify internal packages have `"type": "module"` and correct `exports` fields in their `package.json`.
Verify that `TURBO_TOKEN` is a Turborepo-specific token (not a Vercel Personal Access Token) and `TURBO_TEAM` is set to your correct Vercel team slug or username in your CI environment.
Add all environment variables that influence a task's build output to the `env` array within that task's configuration in `turbo.json`. This ensures the cache is invalidated when these variables change.
To explicitly target a script in the root `package.json` from `turbo.json`, prefix the task name with `//#`, e.g., `"//#prepare": {}`.No dependency data recorded yet.