Skip to content

[Bug] Can't use structuredClone in workflow code #1663

Open
@pn1k

Description

@pn1k

What are you really trying to do?

Make a copy of value in workflow code with structuredClone() function of nodejs.

Describe the bug

It seems that webpack'ed code lack of structuredClone function.

Minimal Reproduction

// in workflow code
const someData = { foo: 'bar' }
const cloneData = structuredClone(someData);

Environment/Versions

  • Node 22.14.0
  • OS and processor: Linux x86
  • Temporal SDK: 1.11.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions