From 4e2d18962d674725978520fb85f5ededb5ce889c Mon Sep 17 00:00:00 2001 From: Richard R Date: Wed, 11 Feb 2026 03:20:22 -0700 Subject: [PATCH] fix(config): update ffmpeg tracing for audiobook APIs Configure Next.js output tracing to properly include ffmpeg and ffprobe static binaries for audiobook processing endpoints. This ensures the required binaries are bundled correctly during deployment across all audiobook API routes. --- next.config.ts | 21 +++++++++++++-------- pnpm-lock.yaml | 12 ++++++------ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/next.config.ts b/next.config.ts index c10b3b8..42eb5d2 100644 --- a/next.config.ts +++ b/next.config.ts @@ -6,17 +6,22 @@ const nextConfig: NextConfig = { canvas: './empty-module.ts', }, }, - serverExternalPackages: ["better-sqlite3"], + serverExternalPackages: ["better-sqlite3", "ffmpeg-static", "ffprobe-static"], outputFileTracingIncludes: { - '/api/audiobook(.*)': [ - 'node_modules/ffmpeg-static/ffmpeg', - 'node_modules/ffprobe-static/bin/linux/*/ffprobe', - 'node_modules/.pnpm/ffmpeg-static@*/node_modules/ffmpeg-static/ffmpeg', - 'node_modules/.pnpm/ffprobe-static@*/node_modules/ffprobe-static/bin/linux/*/ffprobe', + '/api/audiobook': [ + './node_modules/ffmpeg-static/ffmpeg', + './node_modules/ffprobe-static/bin/*/*/ffprobe', + ], + '/api/audiobook/chapter': [ + './node_modules/ffmpeg-static/ffmpeg', + './node_modules/ffprobe-static/bin/*/*/ffprobe', + ], + '/api/audiobook/status': [ + './node_modules/ffmpeg-static/ffmpeg', + './node_modules/ffprobe-static/bin/*/*/ffprobe', ], '/api/whisper': [ - 'node_modules/ffmpeg-static/ffmpeg', - 'node_modules/.pnpm/ffmpeg-static@*/node_modules/ffmpeg-static/ffmpeg', + './node_modules/ffmpeg-static/ffmpeg', ], }, }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6e69f8f..972419d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,12 +22,6 @@ importers: '@headlessui/react': specifier: ^2.2.9 version: 2.2.9(react-dom@19.2.4(react@19.2.4))(react@19.2.4) - '@types/howler': - specifier: ^2.2.12 - version: 2.2.12 - '@types/uuid': - specifier: ^10.0.0 - version: 10.0.0 '@vercel/analytics': specifier: ^1.6.1 version: 1.6.1(next@15.5.12(@playwright/test@1.58.2)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(react@19.2.4) @@ -137,6 +131,9 @@ importers: '@types/ffprobe-static': specifier: ^2.0.3 version: 2.0.3 + '@types/howler': + specifier: ^2.2.12 + version: 2.2.12 '@types/node': specifier: ^20.19.33 version: 20.19.33 @@ -149,6 +146,9 @@ importers: '@types/react-dom': specifier: ^19.2.3 version: 19.2.3(@types/react@19.2.13) + '@types/uuid': + specifier: ^10.0.0 + version: 10.0.0 eslint: specifier: ^9.39.2 version: 9.39.2(jiti@1.21.7)