05 Feb 2014, 23:28
Generic-user-small

Steven Harris (4 posts)

Anyone run into this with the web-services chapter?

Q.async(function* (){
^ 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 Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/Users/steve/node-playing/web-services/b4/server.js:24:1) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)

06 Feb 2014, 00:39
Generic-user-small

Steven Harris (4 posts)

Ok, figured it out. Seems that generators only work with node 0.11.11.

07 Oct 2014, 16:28
Generic-user-small

Hoon Chung (2 posts)

I am having the exactly same problem on MacBook Pro with Node.js v0.10.24. Can you share how you get over this problem? Thanks.

Q.async(function *(){  
                 ^ 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 Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/hoonchung/Documents/Nodejs_the_Right_Way_code/web-services/b4/server.js:25:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32) 7 Oct 12:25:13 - [nodemon] app crashed - waiting for file changes before starting... 
07 Oct 2014, 17:13
Generic-user-small

Hoon Chung (2 posts)

Just stumbled elsewhere on a comment by Bill Brown, suggesting to use “nvm” for a later version of node. I was able to download the latest unstable version, 0.11.14, and the code worked.

  You must be logged in to comment