1

Installing elasticdump throws a bunch of warnings like so

$ npm install -g elasticdump
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated s3signed@0.1.0: This module is no longer maintained. It is provided as is.
/Users/ebeisaac/.npm-packages/bin/elasticdump -> /Users/ebeisaac/.npm-packages/lib/node_modules/elasticdump/bin/elasticdump
/Users/ebeisaac/.npm-packages/bin/multielasticdump -> /Users/ebeisaac/.npm-packages/lib/node_modules/elasticdump/bin/multielasticdump
npm WARN notsup Unsupported engine for elasticdump@6.56.0: wanted: {"node":">=10.0.0"} (current: {"node":"6.13.1","npm":"6.14.9"})
npm WARN notsup Not compatible with your version of node/npm: elasticdump@6.56.0
npm WARN notsup Unsupported engine for fast-csv@4.3.5: wanted: {"node":">=10.0.0"} (current: {"node":"6.13.1","npm":"6.14.9"})
npm WARN notsup Not compatible with your version of node/npm: fast-csv@4.3.5
npm WARN notsup Unsupported engine for p-queue@6.6.2: wanted: {"node":">=8"} (current: {"node":"6.13.1","npm":"6.14.9"})
npm WARN notsup Not compatible with your version of node/npm: p-queue@6.6.2
npm WARN notsup Unsupported engine for p-timeout@3.2.0: wanted: {"node":">=8"} (current: {"node":"6.13.1","npm":"6.14.9"})
npm WARN notsup Not compatible with your version of node/npm: p-timeout@3.2.0

+ elasticdump@6.56.0
updated 1 package in 15.284s

After which, the executable always throws the following error when it is called

$ elasticdump --version   
/Users/ebeisaac/.npm-packages/lib/node_modules/elasticdump/lib/processor.js:40
  async _loop (limit, offset, totalWrites) {
        ^^^^^

SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/ebeisaac/.npm-packages/lib/node_modules/elasticdump/elasticdump.js:3:28)

I even tried installing npm exactly as how it is done in this website. The outcome is still the same.

How to resolve this issue and get elasticdump to work?

Ébe Isaac
  • 11,563
  • 17
  • 64
  • 97

1 Answers1

2

From the logs:

npm WARN notsup Unsupported engine for p-timeout@3.2.0: wanted: {"node":">=8"} (current: {"node":"6.13.1","npm":"6.14.9"})

You are using node.js version 6.x, but it does not support node v6. You need to upgrade to v8 or later.

You can also refer to this and this Github issues

There an issue in conda that prevents it from installing the latest nodejs version in a Mac. In which case, the solution would be to uninstall the conda version like so and use an alternative like homebrew or a pkg from the official site.

Note: do not have both conda and homebrew versions installed in the same time, otherwise even executing homebrew's npm would throw the same error shown in the question.

Ébe Isaac
  • 11,563
  • 17
  • 64
  • 97
ESCoder
  • 15,431
  • 2
  • 19
  • 42
  • Could you expand a bit more on how to upgrade npm to solve this issue? Right now, I'm using anaconda and I am not able to install the latest npm due to [this issue](https://stackoverflow.com/questions/62325068/cannot-install-latest-nodejs-using-conda-on-mac). Or should I ask this as a separate question? – Ébe Isaac Dec 07 '20 at 07:01
  • Thank you, the solution is resolved. I just needed to uninstall the conda version and use the homebrew version instead. – Ébe Isaac Dec 07 '20 at 07:14
  • @ÉbeIsaac glad this worked for you :) Can you please accept the answer as well :) – ESCoder Dec 07 '20 at 07:15
  • 1
    Yes, but I had to take additional non-trivial steps for the resolution. Shall I add those steps to your answer and then accept it? – Ébe Isaac Dec 07 '20 at 07:17
  • Sure @ÉbeIsaac :) – ESCoder Dec 07 '20 at 07:23