安装 elasticdump
像这样发出一堆警告
$ 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
之后,可执行文件在被调用时总是抛出以下错误
$ 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)
我甚至试过安装 npm
就像在这个网站上一样。结果还是一样。
如何解决这个问题 elasticdump
去上班?
1条答案
按热度按时间siv3szwd1#
从日志中:
您使用的是node.js版本6.x,但它不支持node v6。您需要升级到v8或更高版本。
您还可以参考这个和这个github问题
有问题吗
conda
这使得它无法在mac中安装最新的nodejs版本。在这种情况下,解决方案是卸载conda
类似于so的版本,并使用类似于自制或来自官方网站的pkg的替代品。注意:不要同时安装conda和自制版本,否则甚至执行自制版本
npm
会抛出问题中显示的相同错误。