I have a problem. Because when I try to push my MySQL data to Algolia

I am trying to push the data of my data base in Mysql to Algolia. This is the code.

const algoliasearch = require("algoliasearch");
const { ALGOLIA_APPLICATION_ID, ALGOLIA_ADMIN_API_KEY} = process.env;
const client = algoliasearch(ALGOLIA_APPLICATION_ID, ALGOLIA_ADMIN_API_KEY);
const index = client.initIndex("demo_ecommerce");
const _ = require('lodash');

var mysql = require('mysql');

var connection = mysql.createConnection({
    host : 'localhost',
    user : 'root',
    password : 'password',
    database : 'ecommerce'
})

connection.connect();

connection.query("SELECT * FROM productos", (err, res) => {
  if(err){
    console.log(err)
  } else {
    const chunks = _.chunk(res, 1000) 
    chunks.forEach(chunk => index.saveObjects(chunk,{'autoGenerateObjectIDIfNotExist': true}).then(console.log(chunk)).catch(err => {console.log(err)}))
  }
});

My .env is this

ALGOLIA_APPLICATION_ID=Y4VCCCZ5L1

ALGOLIA_ADMIN_API_KEY=fadfa3960c72b2db95c5bb0436780fde

The error that I recieve is the next

    at ClientRequest.setHeader (_http_outgoing.js:521:3)
    at new ClientRequest (_http_client.js:241:14)
    at Object.request (https.js:314:10)
    at C:\Users\giuliana.olmos\Desktop\Giuli\AlgoliaBackend\node_modules\@algolia\requester-node-http\dist\requester-node-http.cjs.js:27:72
    at new Promise (<anonymous>)
    at Object.send (C:\Users\giuliana.olmos\Desktop\Giuli\AlgoliaBackend\node_modules\@algolia\requester-node-http\dist\requester-node-http.cjs.js:16:20)
    at retry (C:\Users\giuliana.olmos\Desktop\Giuli\AlgoliaBackend\node_modules\@algolia\transporter\dist\transporter.cjs.js:222:38)
    at C:\Users\giuliana.olmos\Desktop\Giuli\AlgoliaBackend\node_modules\@algolia\transporter\dist\transporter.cjs.js:235:16     
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  code: 'ERR_HTTP_INVALID_HEADER_VALUE'
} ```