What was going on
Following the customerio-node docs for event tracking in Node.js, `new TrackClient(siteId, apiKey, { region: RegionUS })` then `await trackClient.track(userId, { name, data })` throws `[ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type Function. Received type object`. The code matched the README example exactly.

What fixed it
This was a bug in the library itself: the track request pipeline passed a non-function where Node's EventEmitter expected a listener. The maintainer reproduced it, shipped the fix in `customerio-node@3.0.3` (tested first as 3.0.3-beta.1), and the reporter confirmed the fix. Upgrade to 3.0.3 or later.