grafana-wizzy / wizzy

Manage & automate Grafana with easy wizzy
https://grafana-wizzy.com
Apache License 2.0
468 stars 60 forks source link

wizzy init - SyntaxError: Unexpected token ) #164

Closed IanWilson-2501 closed 4 years ago

IanWilson-2501 commented 4 years ago

When running wizzy init it errors out with Unexpected token )

wizzy init

); ^

SyntaxError: Unexpected token ) 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. (/home/ianw/Downloads/WIZZY/wizzy/src/remote/grafana.js:5:17)

Sytten commented 4 years ago

Are you using the npm version or the repo. The npm version is quite outdated.

IanWilson-2501 commented 4 years ago

I followed the install instructions here: https://grafana-wizzy.com/home/getting-started/ Which uses the repo and npm.

$ git clone https://github.com/grafana-wizzy/wizzy.git $ cd wizzy $ npm install $ npm link ... ... $ wizzy init

What is the correct way to install wizzy?

Sytten commented 4 years ago

What version of node are you using?

IanWilson-2501 commented 4 years ago

nodejs-6.16.0-1.el7.x86_64

Which is the default version in the EPEL 7 repo: https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/n/

IanWilson-2501 commented 4 years ago

Actually it appears they updated it in the repo since we synced it: nodejs-6.17.1-1.el7.x86_64 Is the new default

Sytten commented 4 years ago

Yeah I started using features that are not supported by node6, ideally install the LTS (v10).

IanWilson-2501 commented 4 years ago

OK good to know, thank you for letting me know
It may be worth noting in the install instructions that you need a certain version of nodejs.

Sytten commented 4 years ago

Yeah I will add the minimal version support, node6 is very old (its not even supported anymore).

IanWilson-2501 commented 4 years ago

I know node6 is old, but anyone running RHEL/CentOS 7.6 in a mostly stock build will most likely be running 6.17.1

Sytten commented 4 years ago

I want to move to code to async/await so there is no going back. What I might try to do is polyfill for older versions. But if you are using node6, it's a security disaster waiting to happen...

IanWilson-2501 commented 4 years ago

I agree with the security issue. I got 10.16.3 working so I will go with that. Thank you for your help.