node-clickhouse icon indicating copy to clipboard operation
node-clickhouse copied to clipboard

The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Object

Open HardRock4Life opened this issue 3 years ago • 0 comments

I'm trying to run a simple query, this is the whole code:

const ClickHouse = require('@apla/clickhouse');
var fs = require('fs');

const ch = new ClickHouse({ host, port, user, password });

const readableStream = ch.query(
    'SELECT 1',
    { syncParser: true,
    dataObjects: true },
    (e, r) => {}
  );

readableStream.pipe(process.stdout);

Currently, I'm running into an error you see in the header: Unknown error field: TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Object

What could be the problem?

My current NodeJS version is 14.17.3

HardRock4Life avatar Dec 16 '21 15:12 HardRock4Life