Elasticsearch-js: Breaking change on older node versions

Created on 14 May 2020  路  3Comments  路  Source: elastic/elasticsearch-js

馃悰 Bug Report

I am currently using nodejs v9.5 and getting error on new client version v7.7.0 that has been released hours ago. I don't know if it is done intentionally or not(Sorry if it is done intentionally). But seems like older node versions does not work with the following declaration of generator functions:

async * FunctionName(){}

giving me error on lib/Helpers.js on line 56:

  async * scrollSearch (params, options = {}) {
        ^

To Reproduce

Running on an older version on node reproduces the error.
Adding the error screenshot
22

Your Environment

  • node version: 9.5
  • @elastic/elasticsearch version: >=7.7.0
  • os: Mac
bug v7.x

Most helpful comment

I've just released v7.7.1 on npm with the fix, thank you for reporting!
I would also strongly recommend migrating to a supported version of Node.js, as using an unsupported version could expose you to severe security risks.
You can find the officially supported versions of Node.js here.

All 3 comments

Hello! You are right, the recently introduced Helpers require a special flag for Node v8.
Unfortunately, even if you are not using them, this will break your code.

I'm working on a fix for the issue.

I've just released v7.7.1 on npm with the fix, thank you for reporting!
I would also strongly recommend migrating to a supported version of Node.js, as using an unsupported version could expose you to severe security risks.
You can find the officially supported versions of Node.js here.

I would also strongly recommend migrating to a supported version of Node.js, as using an unsupported version could expose you to severe security risks.

Yes we have plan to migrate. Thank you for the fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bttf picture bttf  路  4Comments

himanshuteotia picture himanshuteotia  路  4Comments

aimyth picture aimyth  路  3Comments

sjparkinson picture sjparkinson  路  5Comments

mojzu picture mojzu  路  4Comments