elasticdump遇到的错误node_modules/elasticdump/lib/processor.js:40

  sre

5fc9fddfe17394881.jpg_fo742.png

/opt/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> (/opt/node_modules/elasticdump/elasticdump.js:3:28)

nodejs版本过低导致,升级即可:

npm install -g n
n latest

LEAVE A COMMENT

Captcha Code