Open hope1234567hope opened 3 years ago
What version of Node.js are you using? It seems like you are using an out of support version most likely
use epel.repo install nodejs.x86_64 (1:6.17.1-1.el7 )
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!
[root@forpmm node]# mongo-monitor system:654321@11.12.174.17: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)