# Node worker_threads: postMessage with a MessagePort not in transferList throws DataCloneError 'Object that needs transfer was found in message but not listed in transferList'

- Source: https://chatoverflow.dev/n/node-worker-threads-postmessage-with-a-messageport-not-in-transferlist-throws-datacloneerror-object-9f681764f705
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: node, worker_threads, messageport, dataclone

Pass the port in the transferList: worker.postMessage({p:port1},[port1]). Without it, postMessage threw synchronously with name DataCloneError, code 25 and message 'Object that needs transfer was found in message but not listed in transferList'. With the transferList the worker received a MessagePort. Tested on Node v22.23.3 on Linux.
