vercel/turborepo · warning

no caches are enabled

Error message

no caches are enabled

What it means

CacheMultiplexer::new (crates/turborepo-cache/src/multiplexer.rs:43-55) computes should_use() for both the local filesystem cache and the remote HTTP cache. The flags are not mutually exclusive, so you can disable both; since a cache-less build still works (just slower), turbo warns instead of failing: 'no caches are enabled'.

Source

Thrown at crates/turborepo-cache/src/multiplexer.rs:49

impl CacheMultiplexer {
    #[tracing::instrument(skip_all)]
    pub fn new(
        opts: &CacheOpts,
        repo_root: &AbsoluteSystemPath,
        api_client: Option<APIClient>,
        api_auth: Option<APIAuth>,
        analytics_recorder: Option<AnalyticsSender>,
        scm_state: LazyScmState,
    ) -> Result<Self, CacheError> {
        let use_fs_cache = opts.cache.local.should_use();
        let use_http_cache = opts.cache.remote.should_use();

        // Since the above two flags are not mutually exclusive it is possible to
        // configure yourself out of having a cache. We should tell you about it
        // but we shouldn't fail your build for that reason.
        if !use_fs_cache && !use_http_cache {
            turborepo_log::warn(
                turborepo_log::Source::turbo(turborepo_log::Subsystem::Cache),
                "no caches are enabled",
            )
            .emit();
        }

        debug!(
            "CacheMultiplexer::new creating FSCache with cache_dir={}, repo_root={}",
            opts.cache_dir, repo_root
        );
        let fs_cache = use_fs_cache
            .then(|| {
                FSCache::new(
                    &opts.cache_dir,
                    repo_root,
                    analytics_recorder.clone(),
                    scm_state.clone(),
                )

View on GitHub (pinned to f9245100cf)

Solutions

  1. If you intended remote-only caching, link and authenticate: `turbo login` + `turbo link`, or set TURBO_TOKEN and TURBO_TEAM.
  2. Drop `--remote-only` so the local filesystem cache is used.
  3. Audit flags/config: check for --no-cache, cache settings in turbo.json, and TURBO_REMOTE_CACHE_ENABLED in the environment.
  4. Confirm the warning disappears and cache behavior by watching the cache status line in run output.

Example fix

# before: remote-only without credentials -> local off, remote off
export TURBO_TEAM=my-team   # token missing/unlinked
turbo run build --remote-only   # -> no caches are enabled

# after: authenticate, or re-enable local caching
export TURBO_TOKEN=xxxx TURBO_TEAM=my-team
turbo run build --remote-only   # remote cache enabled
Defensive patterns

Strategy: validation

Validate before calling

#!/usr/bin/env bash
# fail fast in CI when caching is silently off
if [[ "$*" == *--remote-only* ]]; then
  : "${TURBO_TOKEN:?--remote-only set but TURBO_TOKEN missing — no cache would be enabled}"
  : "${TURBO_TEAM:?--remote-only set but TURBO_TEAM missing}"
fi
turbo run build "$@"

Prevention

When it happens

Trigger: Passing --remote-only (implies local cache off) while the remote cache is unavailable/unconfigured (not linked, no TURBO_TOKEN/TURBO_TEAM), or combining cache config that disables both sides: --no-cache, remoteCache settings, or TURBO_REMOTE_CACHE_ENABLED=0 with local caching disabled.

Common situations: CI pipelines copying a `--remote-only` flag from another project without linking this one; TURBO_TOKEN/TURBO_TEAM env vars missing in a fork's CI; or explicit cache config in turbo.json disabling both layers. Every task runs cold, so builds are slow despite no errors.

Related errors


AI-assisted analysis of vercel/turborepo@f9245100cf (2026-08-17). Data as JSON: /api/errors/94241ef06af9cec4. Report an issue: GitHub.