Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does node.js support the * though. I tried their example and getting this:

  app.use(function *(next){
                   ^
  SyntaxError: Unexpected token *
      at Module._compile (module.js:439:25)
      at Object.Module._extensions..js (module.js:474:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
      at Function.Module.runMain (module.js:497:10)
      at startup (node.js:119:16)
      at node.js:901:3


It requires node v0.11.3 or above and the --harmony-generators flag at launch.

Or use gnode, which will down-compile it to ES5 for current stable node.


You probably need the `--harmony-generators` or `--harmony` flag.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: