Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
turbo CLI
✓ This package is a native binary and is not imported directly into JavaScript/TypeScript code. It is executed as a command-line interface (CLI) tool via the `turbo` command, which is made available by installing the `turbo` npm package.
Turborepo is primarily a CLI tool for orchestrating tasks in monorepos. The `turbo-linux-ppc64le` package is a backend binary, not a library for programmatic import. The main `turbo` package manages the correct binary installation.
create-turbo
✓ npx create-turbo@latest
✗ import { createTurbo } from 'turbo'
`create-turbo` is a command-line tool for scaffolding new Turborepo projects, not an importable JavaScript function. It's best run via `npx` or `dlx` to ensure the latest version is used.
Demonstrates how to scaffold a new Turborepo monorepo, run monorepo-wide tasks like build, target specific application tasks, and use code generators via the `turbo` CLI.
import { execSync } from 'child_process';
import path from 'path';
import fs from 'fs';
const projectDir = 'my-turborepo-app';
const appName = 'web'; // Default app created by create-turbo
console.log(`1. Creating a new Turborepo project named "${projectDir}"...`);
execSync(`npx create-turbo@latest ${projectDir} --eslint --typescript`, { stdio: 'inherit' });
process.chdir(projectDir);
console.log(`2. Changed directory to ${process.cwd()}`);
console.log('3. Running the "build" task across all packages in the monorepo:');
execSync('pnpm turbo build', { stdio: 'inherit' });
console.log('\n4. Running the "dev" task for a specific application (e.g., "web"):');
console.log(' (This command will likely stay running, you may need to interrupt it)');
try {
execSync('pnpm turbo dev --filter=web', { stdio: 'inherit', timeout: 5000 }); // Timeout for example
} catch (e) {
// Expected to fail with timeout if dev server starts
if (e.code !== 'ETIMEDOUT' && !e.killed) {
console.error(`Error during dev command: ${e}`);
} else if (e.killed) {
console.log('Dev command terminated for demonstration purposes.');
}
}
console.log('\n5. Generate a new package using the Turbo generator:');
execSync('pnpm turbo gen react-component my-new-component --destination=packages/ui', { stdio: 'inherit' });
console.log('\nTurborepo basic operations demonstrated.');
console.log('Refer to the official documentation for advanced configurations and features.');
Debug
Known issues
gotchaThis package (`turbo-linux-ppc64le`) is a platform-specific binary. Installing it directly may lead to issues if your system architecture does not match or if the main `turbo` package expects a different version. Always prefer installing the `turbo` npm package, which automatically resolves and installs the correct underlying binary for your system.fixEnsure you are installing the main `turbo` package (e.g., `npm install turbo --save-dev` or `pnpm add turbo -D`). The platform-specific binary will be installed as a transitive dependency.
affects: >=1.0.0
breakingTurborepo 2.0 (released June 2024) introduced several breaking changes. The `--scope` flag was removed, and `--filter` behavior was modified. The `packageManager` field in the root `package.json` is now required for improved stability and predictability. Workspace root directory is now an implicit dependency of all packages, which might affect caching.fixRun `npx @turbo/codemod migrate` to automatically update `turbo.json` files and add `name` fields to `package.json` files. Add a `packageManager` field to your root `package.json` (e.g., `'pnpm@9.2.0'`). Update `turbo run` commands to use `--filter` where `--scope` was previously used.
affects: >=2.0.0
breakingTurborepo 2.0 changed the default environment variable handling to 'Strict Mode'. All environment variables are now included in the cache key by default, which can lead to unexpected cache misses if non-deterministic environment variables are present.fixExplicitly define which environment variables affect a task's cache by adding them to the `env` array in your `turbo.json` configuration. For local development, you can temporarily opt out of Strict Mode using the `--env-mode=loose` flag or by setting `envMode: 'loose'` in `turbo.json` for a task.
affects: >=2.0.0
gotchaPlacing common *runtime* dependencies (e.g., React, UI libraries) in the root `package.json` instead of individual workspace `package.json` files can lead to issues like multiple instances of the same library being loaded, causing runtime errors or unexpected behavior.fixEnsure that root `package.json` only contains development dependencies relevant to the monorepo tooling (e.g., `turbo`, `eslint`, `prettier`). Move all package-specific dependencies to their respective workspace `package.json` files. Do not run `npm install` inside sub-packages, as this can create `package-lock.json` files and duplicate `node_modules` folders.
affects: >=1.0.0
gotchaRecent canary releases addressed fixes for Vercel auth token recovery and compatibility. Users relying on Vercel Remote Caching or other Vercel integrations might encounter authentication issues with older `turbo` versions or specific configurations.fixEnsure your `turbo` package is updated to the latest stable version. Verify Vercel auth tokens and team IDs are correctly configured in your environment or CI/CD settings (`TURBO_TOKEN`, `TURBO_TEAM`). Consider re-authenticating if issues persist.
affects: >=2.9.7-canary.0
Errors
Common errors & fixes
Error: Command failed with exit code 1. Unsupported platform.
The `turbo` command attempted to execute a native binary that is not compatible with the current operating system or CPU architecture. This often happens when a specific platform binary is directly installed or cached incorrectly.
fixEnsure you have the main `turbo` npm package installed (`npm install turbo` or `pnpm add turbo`). It will automatically download the correct binary for your system. Clear `node_modules` and your package manager's cache if the issue persists.
sh: turbo: command not found
The `turbo` executable is not found in the system's PATH. This can occur if the `turbo` package was not installed globally, or if local installation binaries are not correctly linked/accessible.
fixIf installed locally, ensure you are running `turbo` commands via your package manager's executor (e.g., `npx turbo`, `pnpm turbo`, `yarn turbo`). If you intend to use `turbo` globally, install it with `npm install -g turbo` or `pnpm add -g turbo`.
Invariant Violation: Missing field 'packageManager' in package.json for workspace at root of your repository.
Since Turborepo 2.0, the `packageManager` field in the root `package.json` is a mandatory requirement to explicitly declare the package manager used in the monorepo.
fixAdd the `packageManager` field to your root `package.json`, specifying the package manager and its version (e.g., `"packageManager": "pnpm@9.2.0"`, `"packageManager": "npm@10.8.1"`, `"packageManager": "yarn@1.22.19"`, or `"packageManager": "bun@1.2.0"`).
Error: Missing field 'name' in package.json for workspace at /path/to/workspace.
Turborepo 2.0 requires all workspace `package.json` files to have a `name` field defined.
fixRun `npx @turbo/codemod migrate` which automatically adds missing `name` fields to `package.json` files. Alternatively, manually add a `"name": "your-package-name"` field to each affected workspace's `package.json`.
React Hook "useState" cannot be called inside a callback. React components must be PascalCase. (Or similar runtime errors due to duplicate libraries)
This error typically indicates that multiple instances of a library (like React) are loaded in the same application context. In a monorepo, this often happens when a shared dependency is incorrectly duplicated between the root `node_modules` and a workspace's `node_modules`, or if a common runtime dependency is placed in the root `package.json`.
fixEnsure all shared *runtime* dependencies are installed directly in the respective workspace's `package.json` and not in the root `package.json` (which should primarily contain dev tooling). Verify your package manager's hoisting behavior and ensure no `node_modules` or `package-lock.json` files exist within individual workspace directories. Run a clean install (e.g., `pnpm install --force`).
Audit
Dependencies
turbooptionalThis package is a platform-specific native binary. It is an optional, transitive dependency of the primary `turbo` npm package, which handles the installation of the correct binary for the user's system. End-users typically install `turbo` directly, not this specific architecture-bound package.