Fix type errors that failed the Docker build
- Cast the transcoder upload body to node:stream/web ReadableStream; the DOM ReadableStream type lacks the async-iterator members Readable.fromWeb expects - Exclude transcoder/ and transcoder-remote/ from the root tsconfig: they are standalone sub-projects with their own tsconfig and dependencies (e.g. archiver) that aren't installed in the root node_modules, so next build's typecheck can never resolve them Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,7 +69,9 @@ export async function POST(
|
||||
|
||||
// 1. Stream upload body to a temp zip file on disk.
|
||||
const nodeReadable = Readable.fromWeb(
|
||||
request.body as ReadableStream<Uint8Array>
|
||||
// DOM ReadableStream and node:stream/web ReadableStream are structurally
|
||||
// different types; fromWeb expects the latter
|
||||
request.body as unknown as import("node:stream/web").ReadableStream<Uint8Array>
|
||||
);
|
||||
const writeStream = fssync.createWriteStream(tempZipPath);
|
||||
await pipeline(nodeReadable, writeStream);
|
||||
|
||||
+1
-1
@@ -30,5 +30,5 @@
|
||||
".next/dev/types/**/*.ts",
|
||||
"**/*.mts"
|
||||
],
|
||||
"exclude": ["node_modules", "public"]
|
||||
"exclude": ["node_modules", "public", "transcoder", "transcoder-remote"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user