Skip to content

Docker build fails on main: 5 TypeScript errors prevent production build #782

Open

Description

@darinbro

Summary

Running docker compose up -d --build on the current main branch fails with TypeScript errors. The Next.js build exits on the first error, so they surface one at a time. There are 5 distinct issues across 4 files.

Environment

  • macOS (Darwin 25.3.0)
  • Docker Desktop 4.71.0
  • Docker Compose v5.1.3
  • Installed via docker compose up -d --build per the README

Errors (in order of appearance)

1. Missing export: isShortcutKey — src/actions/keybinding.ts

src/actions/keybindings/persistence.ts imports isShortcutKey from @/actions/keybinding, but the function is never defined or exported from that module.

Type error: '"@/actions/keybinding"' has no exported member named 'isShortcutKey'. Did you mean 'ShortcutKey'?
  --> src/actions/keybindings/persistence.ts:2

Fix: Add a type guard to src/actions/keybinding.ts:

const MODIFIER_SET = new Set<string>([
  "ctrl", "alt", "shift", "ctrl+shift", "alt+shift", "ctrl+alt", "ctrl+alt+shift",
]);

export function isShortcutKey(value: string): value is ShortcutKey {
  if (isKey(value)) return true;
  const lastPlus = value.lastIndexOf("+");
  if (lastPlus === -1) return false;
  return MODIFIER_SET.has(value.slice(0, lastPlus)) && isKey(value.slice(lastPlus + 1));
}

2. Missing export: isActionWithOptionalArgs — src/actions/definitions.ts

src/actions/keybindings/persistence.ts imports isActionWithOptionalArgs from @/actions, but no such function is exported anywhere in that module tree.

Type error: '"@/actions"' has no exported member named 'isActionWithOptionalArgs'. Did you mean 'TActionWithOptionalArgs'?
  --> src/actions/keybindings/persistence.ts:4

Fix: Add a runtime guard to src/actions/definitions.ts:

const ACTION_SET = new Set<string>(Object.keys(ACTIONS));
const REQUIRED_ARGS_ACTIONS = new Set<string>(["remove-media-asset", "remove-media-assets"]);

export function isActionWithOptionalArgs(value: string): value is TActionWithOptionalArgs {
  return ACTION_SET.has(value) && !REQUIRED_ARGS_ACTIONS.has(value);
}

3. IndexedDBAdapter called with positional args (3 occurrences) — src/services/storage/migrations/

The IndexedDBAdapter constructor signature is ({ dbName, storeName, version }), but the migration files call it with three positional arguments.

Type error: Expected 1 arguments, but got 3.
  --> src/services/storage/migrations/runner.ts:43
  --> src/services/storage/migrations/v1-to-v2.ts:126
  --> src/services/storage/migrations/v1-to-v2.ts:135
  --> src/services/storage/migrations/v1-to-v2.ts:162

Additionally, projectsAdapter.set(projectId, result.project) in runner.ts:98 uses the old positional API; the current signature is set({ key, value }).

Fix: Update all call sites to use the object API:

// Before
new IndexedDBAdapter<T>("db-name", "store-name", 1)

// After
new IndexedDBAdapter<T>({ dbName: "db-name", storeName: "store-name", version: 1 })
// Before
await projectsAdapter.set(projectId, result.project)

// After
await projectsAdapter.set({ key: projectId, value: result.project })

4. stickersRegistry.register() called with positional args — src/stickers/providers/index.ts

DefinitionRegistry.register() takes { key, definition }, but src/stickers/providers/index.ts:22 passes two positional arguments.

Type error: Expected 1 arguments, but got 2.
  --> src/stickers/providers/index.ts:22

Fix:

// Before
stickersRegistry.register(provider.id, provider)

// After
stickersRegistry.register({ key: provider.id, definition: provider })

Notes

These all look like the result of an API refactor (positional args → object args) that wasn't applied consistently across all call sites. All five fixes are mechanical and do not require any logic changes.

Activity

  1. added 2 commits that reference this issue on May 18, 2026
    ecc14c0
    455f73c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions