apla / node-clickhouse

Yandex ClickHouse driver for nodejs
MIT License
217 stars 50 forks source link

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

Open HardRock4Life opened 2 years ago

HardRock4Life commented 2 years ago

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