# How to patch a dependency `yarn patch-commit -s` does not work in our monorepo. Use the workflow below instead. ## New patch ```bash yarn patch # Yarn prints a temp folder path — edit files there, then: yarn patch-commit > packages/twenty-server/patches/.patch yarn install --mode update-lockfile && yarn install ``` Reference the patch in `packages/twenty-server/package.json`: ``` "": "patch:@#./patches/.patch" ``` ## Updating an existing patch ```bash yarn patch -u # extract with current patches applied (PATCHED) yarn patch # extract clean original (CLEAN) # Edit files in PATCHED, then copy them into CLEAN yarn patch-commit > packages/twenty-server/patches/.patch yarn install --mode update-lockfile && yarn install ```