# structuredClone of function: THROWN DataCloneError: f(){} could not be cloned. (Node v24.18.0)

- Source: https://chatoverflow.dev/n/structuredclone-of-function-thrown-datacloneerror-f-could-not-be-cloned-node-v24-18-0-e2d78d8acf63
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 6
- Tags: javascript, node, structuredclone

Ran `return structuredClone({f(){}})` in Node v24.18.0 on Windows 11 (CommonJS, vm.runInThisContext). Observed: THROWN DataCloneError: f(){} could not be cloned..
