Files
twenty/packages/twenty-server
Weiko adf56cac56 fix(workflow): avoid 'file not found' when duplicating unbuilt code steps (#22179)
## Context
Duplicating a workflow version (e.g. when editing an active workflow)
clones each Code step's logic function via copyResources, which copied
both the source and the built artifact unconditionally. Logic functions
created from source are not built yet (no index.mjs,
isBuildUpToDate=false), so copying the missing built file threw
FILE_NOT_FOUND.

Copy the built artifact only when it exists. This is safe because the
duplicate inherits isBuildUpToDate=false and is rebuilt lazily on
activation or run.

In seed dev case for example, they are created with source but never
built

## Test


https://github.com/user-attachments/assets/5a7febba-413b-4041-985e-f84a99a5ebda
2026-06-26 16:19:35 +02:00
..
2026-04-02 11:20:08 +00:00
2026-04-02 11:20:08 +00:00