WhatBrokeToday
FAQ
Bun

Bun outage (Nov 24): Bun Build --dts Fails With Outside Root Directory Error When Tsconfig Uses References

medium

Is it fixed? Not yet.

Ongoing since Nov 24, 12:42 UTC. First reported Nov 24, 12:42 UTC.

What happened

Bun's `bun build --dts` command fails with a "cannot write a declaration file ... outside the root directory" error when a package's tsconfig.json includes project references, even if the referenced project is never imported.

What caused it?

Under active investigation. No report has identified a root cause yet.

No verified workaround yet

None of the linked reports describe a mitigation. This page updates when one appears.

Official fix

Outage timeline

  1. Investigating(current)
  2. Workaround available(upcoming)
  3. Resolved(upcoming)
  1. First report on GitHub issue

    `bun build --dts` fails with "cannot write a declaration file … outside the root directory" when tsconfig has `references`

    Source

Reports of this outage

1 report · 1 GitHubShow
  1. [1]
    GitHub First report
    `bun build --dts` fails with "cannot write a declaration file … outside the root directory" when tsconfig has `references`(opens GitHub issue in a new tab)

    What happens bun build --dts fails when the package's tsconfig.json has references, even if the package never imports the referenced project: error: cannot write a declaration file for <repro>/a/src/index.ts because it is outside the root directory <repro>/b/src. Pass --root to change it Repro a/tsconfig.json a/src/index.ts b/tsconfig.json b/src/index.ts // a/tsconfig.json { "compilerOptions": { "composite": true, "rootDir": "src", "strict": true, "module": "ESNext", "moduleResolution":…

    by XavierGeerinck 0upvotes 1comments

Bun outage FAQ

What happened in the Bun outage, and why?

Ongoing since Nov 24, 12:42 UTC. No cause has been published yet; this page adds it once the vendor or a report explains it.

What is affected by the Bun outage?

Bun.

When did the Bun outage start and end?

It started Nov 24, 12:42 UTC and is still ongoing (14 h 49 min so far). This page updates as it develops.

How do I get alerts for Bun?

Subscribe to the Bun RSS feed for every new Bun incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether Bun is down. Bun feed

Where does this information come from?

WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 1 report from 1 independent source.