Remove Deprecation warnings in Elasticsearch nodejs client

Hi
I'm using node10 (in AWS Lambda), the 7.9 nodejs client version and a 7.9.3 ES cluster (in Elasticsearch service from cloud.elastic.co).
Every time I'm calling Elasticsearch I get this in the error log:

(node:8) DeprecationWarning: You are using a version of Node.js that will reach EOL in April 2021. The support for this version will be dropped in 7.13. Please refer to https://ela.st/nodejs-support for additional information.

How can I remove this message? maybe disable the deprecation warning?
I also created an issue in github: Remove deprecation warnings · Issue #1387 · elastic/elasticsearch-js · GitHub

Thanks in advance!

Hi Vincent, you need to upgrade to a newer version of Node. If you visit the page linked from the message, https://ela.st/nodejs-support, you'll see that v10 is deprecated and will soon become unsupported.

1 Like

Hi David
thank you for your answer.
As you may guess, I can't upgrade node by myself... Hence my question about removing this log (which by the way seems to appear in the error log although it's a warning?)

No, the warning is important, you absolutely should not ignore it. Node v10 reaches EOL very soon so an upgrade is pretty urgent. If you can't upgrade it yourself you need to find someone who can.

Thank you again @DavidTurner
I asked again my provider to upgrade the node version of the platform.
Meanwhile, I downgraded the nodejs client to v7.8 and the warning is removed. This is not a good solution, and I expect nodejs to be upgraded soon!
Thanks again for your support.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.