cedricblondeau / world-cup-2018-cli-dashboard

⚽🏆 World Cup 2018 CLI dashboard: watch matches in your terminal.

Home Page:https://www.npmjs.com/package/world-cup-cli-dashboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installed using NPM. Doesn't work. Appears to be a few commits behind what I see on Github

dchardin opened this issue · comments

I'm using Ubuntu 16.04

donnie@blacklodge:~$ node -v v4.2.6

Installed like so...

donnie@blacklodge:~$ sudo npm install -g world-cup-cli-dashboard ▄ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ WARN engine world-cup-cli-dashboard@1.4.0: wanted: {"node":">=6"} (current: {"node":"4.2.6","npm":"3.5.2"}) /usr/local/bin/wc2018 -> /usr/local/lib/node_modules/world-cup-cli-dashboard/bin/wc2018 /usr/local/lib └── world-cup-cli-dashboard@1.4.0

ERROR OCCURS ON STARTUP

`
donnie@blacklodge:~$ wc2018
/usr/local/lib/node_modules/world-cup-cli-dashboard/dist/format.js:93
function getFormattedDatetime(match, displayMinuteIfLive = false) {
^

SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/usr/local/lib/node_modules/world-cup-cli-dashboard/dist/components/GroupList/GroupDetails/GroupDetails.js:15:15)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)

`

THEORIES:

I examined the format.js file to see if I could track down the syntax error.

vim /usr/local/lib/node_modules/world-cup-cli-dashboard/dist/format.js
Haven't corrected it yet, but I did notice that my format.js file looks a bit different than the current version on Github. Perhaps the latest version has not been pushed out to the npm repositories?

Hi @dchardin -- If you want to use NPM to install the dashboard, you'll need NodeJS 6+. I see your current version is v4.2.6 and that may explain the SyntaxError.

EDIT: I just tried myself with NodeJS 4.9.1 and got the exact same error. I'd recommend using Docker to avoid any installation problems or update NodeJS.