mongo-monitor icon indicating copy to clipboard operation
mongo-monitor copied to clipboard

use error

Open hope1234567hope opened this issue 4 years ago • 3 comments

[root@forpmm node]# mongo-monitor system:[email protected]:27017,11.12.174.18:27017,11.12.174.19:27017?replicaSet=devel1 /usr/lib/node_modules/mongo-monitor-cli/src/mongo-monitor.js:24 async function checkStatus(params) { ^^^^^^^^

SyntaxError: Unexpected token function 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. (/usr/lib/node_modules/mongo-monitor-cli/bin/mongo-monitor.js:6:17)

hope1234567hope avatar Sep 29 '20 02:09 hope1234567hope

What version of Node.js are you using? It seems like you are using an out of support version most likely

dwmkerr avatar Oct 21 '20 03:10 dwmkerr

use epel.repo install nodejs.x86_64 (1:6.17.1-1.el7 )

hope1234567hope avatar Nov 13 '20 02:11 hope1234567hope

What is the output of node -v? Basically I'd suggest install something like nvm (node version manager) and make sure you are using the LTS version!

dwmkerr avatar Nov 16 '20 05:11 dwmkerr