question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] elasticdump v. 6.15.4 only supports Node.js 10+

See original GitHub issue
  • ElasticDump version: 6.15.4
  • Elasticsearch version: irrelevant
  • Node.js version: 8.15.0
  • Full command you are having issue with: elasticdump --output http://localhost:9200/someIndex --input=fileName
  • A data-set you can share publicly which reproduces the problem: irrelevant

Describe the bug When running the simple command elasticdump --output=... --input=... on Node.js v8, I get the following error:

TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
    at Object.promisify (internal/util.js:214:11)
    at Object.<anonymous> (/usr/local/lib/node_modules/elasticdump/lib/transports/file.js:9:28)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)

Additional context The problem is with this change: https://github.com/taskrabbit/elasticsearch-dump/commit/ec1e96b65492f57bda4a6de927afc93014fd8918#diff-f60b04ac83f174b93b06625be32a86f5R9 It adds use of Node.js’s built in stream.pipeline function that was only added to Node v10, as can be seen here: https://nodejs.org/api/stream.html#stream_stream_pipeline_streams_callback

I’m not sure if this is a bug since I couldn’t find the minimal version of Node.js that elasticdump targets. If elasticdump targets Node.js 10+ then I would add that to its readme.md and would bump the major version number to 7 since this is a breaking change. If this is an unintentional bug then I would recommend running elasticdump’s CI tests on the minimal targeted Node.js version to catch bugs like this.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12

github_iconTop GitHub Comments

9reactions
MajPaycommented, Sep 29, 2020

Just crashed into this. Provisioned a VM with Ubuntu 18.04, nodejs and npm are installed via apt (version 8.10.0) and elasticdump is installed via npm. Results in this error.

So you have to: Either install a fixed version of elasticdump or a fixed version of nodejs.

In my case: npm i -g elasticdump@6.15.5

1reaction
ferronrsmithcommented, Oct 28, 2019

That’s an error on my part. This has been resolved in v6.15.5

Read more comments on GitHub >

github_iconTop Results From Across the Web

elasticdump - npm
Start using elasticdump in your project by running `npm i elasticdump`. There are 26 other projects ... elasticdump. 6.15.4 • Public • Published...
Read more >
elasticdump/README.md - UNPKG
22, - Version `3.0.0` of Elasticdump has the default queries updated to only work for ElasticSearch version 5+. The tool *may* be compatible...
Read more >
A practical guide to working with Elasticdump - LogRocket Blog
Elasticdump is a tool for importing and exporting data stored in an Elasticsearch index or cluster. Review its implementation and use cases.
Read more >
Guide to Elasticdump - Moving and Saving Elasticsearch Indices
Perhaps we just need a safe backup before moving data to another ... We'll need to have Node.js installed, alongside the Node Package ......
Read more >
How to use ElasticDump tool for migrating, copying ... - YouTube
It also supports exporting multiple indices at the same time to a ... NodeJS 07:46 starting elasticsearch 08:15: Starting Kibana 10 :50: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found