From 8ddb9c6dbd663055802706f90fbd99447e921fc0 Mon Sep 17 00:00:00 2001 From: Bernd Rodler Date: Thu, 6 Aug 2026 19:08:24 +0200 Subject: [PATCH] build: exclude electron output + local data dirs from Next file tracing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A previous packaged .app under dist-electron-builds/ carries its own data/ tree, and output tracing tried to copy pieces of the OLD app into the NEW standalone output during dist:mac ("Failed to copy traced files..." warnings). Zero bytes actually leaked (the copies ENOENT'd), but the failure mode — yesterday's build inside today's artifact — is bad enough to fence off explicitly, same as ./repos already was. --- next.config.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/next.config.ts b/next.config.ts index c578eebf..c265f58d 100644 --- a/next.config.ts +++ b/next.config.ts @@ -61,8 +61,15 @@ const nextConfig: NextConfig = { // Sibling repos checked out under ./repos/ are unrelated source trees that // Turbopack's NFT can otherwise rope into the trace when dynamic fs calls // confuse it. Keeps the build from ballooning memory tracing dead code. + // + // dist-electron-builds/ is the OUTPUT of electron-builder — a previous + // packaged .app sitting there contains its own data/ tree, and tracing + // once tried to copy pieces of the old app into the new standalone output + // ("Failed to copy traced files ... dist-electron-builds/..." warnings, + // observed 2026-08-06). Same reasoning for ./data/, a dev-run server's + // local state dir. outputFileTracingExcludes: { - "*": ["./repos/**/*"], + "*": ["./repos/**/*", "./dist-electron-builds/**/*", "./data/**/*"], }, turbopack: { root: import.meta.dirname,