OpenCut-app / OpenCut-app/OpenCut

[BUG] Unable to build locally

Open
#809 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
89.8k
Forks
8.9k
PR merge metrics
No merged PRs in 30d

Description

Platform

MacOS

Browser

Terminal

Current Behavior

The error was that docker compose build failed due to several TypeScript compilation errors in the codebase. The build process (next build with TypeScript) caught the following issues:

Missing isShortcutKey function — persistence.ts imported isShortcutKey from keybinding.ts, but the file only exported the type ShortcutKey and the helper isKey. The runtime guard function simply didn't exist.
Missing isActionWithOptionalArgs function — Same pattern: persistence.ts imported it from @/actions, but no module in the actions barrel exported a runtime implementation — only the type TActionWithOptionalArgs existed.
IndexedDBAdapter constructor mismatch — Multiple files (runner.ts, v1-to-v2.ts) called new IndexedDBAdapter(dbName, storeName, version) with positional arguments, but the constructor signature expects a single options object { dbName, storeName, version }.
IndexedDBAdapter.set() call — runner.ts called adapter.set(key, value) with two positional args, but set() expects { key, value }.
stickersRegistry.register() call — Called as register(id, provider) with two positional args, but DefinitionRegistry.register() expects { key, definition }.
Fixes:

Added isShortcutKey() to keybinding.ts that validates a string matches either a single key or a modifier+key pattern using the existing isKey() and the valid modifier combinations
Added isActionWithOptionalArgs() to definitions.ts that checks if a string is a known action key (excluding the two with mandatory args)
Converted all IndexedDBAdapter constructor and method calls to use the object parameter pattern
Converted the stickersRegistry.register() call to use the object { key, definition } format
Fixes on https://github.com/nachikethreddyy/opencut

Expected Behavior

No response

Recurrence Probability

Always

Steps To Reproduce

Fork the repository and try to build it for the first time.

git clone https://github.com/OpenCut-app/OpenCut.git /var/folders/ts/w3dhgdrd00n5njrklq7t83d40000gn/T/opencut
cd /var/folders/ts/w3dhgdrd00n5njrklq7t83d40000gn/T/opencut
docker compose up -d

Anything else?

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running docker compose up -d and the local build to reproduce the TypeScript errors. Inspect keybinding.ts, definitions.ts, persistence.ts, runner.ts, and v1-to-v2.ts, along with the IndexedDBAdapter and stickersRegistry call sites. Done means the reported missing helpers and parameter mismatches are resolved and the build completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, nextjs, typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.