chentsulin / watch-nba

Watch NBA game in your terminal.
MIT License
98 stars 7 forks source link

something wrong #4

Closed arphen closed 7 years ago

arphen commented 7 years ago
$ watch-nba
/Users/***/.config/yarn/global/node_modules/watch-nba/src/watchGame.js:77
module.exports = async function watchGame(gameUrlCode, duration = 30000) {
                       ^^^^^^^^
SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/***/.config/yarn/global/node_modules/watch-nba/src/index.js:1:81)
kpman commented 7 years ago

@arphen Which version of node are you using?

chentsulin commented 7 years ago

Maybe we could simply compile async function to generator: https://github.com/leebyron/async-to-gen

siygle commented 7 years ago

Maybe add engines into package.json to remind user only run this under node > 8.0.0?

kpman commented 7 years ago

5 already list the engines in the package.json, so I am going to close this issue. And we will support node v6 using async-to-gen in the future.