[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:
- Created 4 years ago
- Comments:12
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
That’s an error on my part. This has been resolved in v6.15.5