fix(file-server): import minio Client as a value again - #5
Merged
TomasPalsson merged 1 commit intoSep 25, 2026
Merged
Conversation
The upstream sync (#4) turned the minio import into a type-only import, but the fork's createMinioClient still calls new Client(...). Bun strips type imports, so Client is undefined at runtime and file-server exits with 'Critical: Could not initialize storage' on every start (seen on apro-sandbox, task def code-interpreter:25). tsc reports it as TS1361 at lines 90/115/122.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Import
Clientfromminioas a value again inservice/src/file-server.ts.Why
The upstream sync (#4) changed the import to
import type { ..., Client, ... } from 'minio', but this fork'screateMinioClient()in the same file still callsnew Client(...)(lines 90, 115, 122). Bun strips type-only imports, soClientis undefined at runtime. On apro-sandbox every file-server start ate0d62edb9loggedCritical: Could not initialize storageand exited with code 1, so ECS never got the new version running.The build did not catch it because the image build does not type-check.
Check
cd service && bunx tsc --noEmit -p .reportsTS1361: 'Client' cannot be used as a value because it was imported using 'import type'atfile-server.tslines 90, 115, 122.file-server.ts.bun test ./src/file-download.test.ts ./src/file-object-resolver.test.ts: 13 pass, 0 fail.