nextjs - 💡(How to fix) Fix [Turbopack] Windows `next build` fails in standalone mode with `EINVAL: invalid argument, copyfile ... node:inspector` [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#89890Fetched 2026-04-08 00:21:09
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×4closed ×1commented ×1issue_type_added ×1

Code Example

1. Create a Next.js 16.1.6 project on Windows.
2. Enable `output: "standalone"` in `next.config.ts`.
4. Run `next build`.
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/example/sorry

To Reproduce

When running next build with output: "standalone" on Windows using Turbopack (default in Next.js 16+ or explicitly enabled), the build fails during the file copying phase.

It attempts to copy a traced file for the node:inspector module, but the destination filename contains a colon (:), which is invalid on Windows filesystems.

This issue persists even in Next.js 16.1.6, despite PR #88273 (escape colon in output names) being merged.

Current vs. Expected behavior

(

Provide environment information

1. Create a Next.js 16.1.6 project on Windows.
2. Enable `output: "standalone"` in `next.config.ts`.
4. Run `next build`.

Which area(s) are affected? (Select all that apply)

Output, Turbopack, Webpack

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

No response

extent analysis

Quick Fixes

FixWhen to useWhat it does
1️⃣ Upgrade to Next ≥ 16.2.0 (or the next patch that includes the colon‑escape fix)You can change the Next versionThe built‑in file‑tracing logic now sanitises : on

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix [Turbopack] Windows `next build` fails in standalone mode with `EINVAL: invalid argument, copyfile ... node:inspector` [1 comments, 2 participants]