duojs / duo

A next-generation package manager for the front-end
3.42k stars 117 forks source link

Duo Build Error #503

Closed ghost closed 8 years ago

ghost commented 8 years ago

Running into an issue compiling anything with duo on a ubuntu trusty64 vagrant box. Console outputs the following:

vagrant@qvm:/vagrant$ duo index.js > build.js
Error: unrecognized flag --harmony-generators
Try --help for options

/usr/lib/node_modules/duo/lib/duo.js:297
Duo.prototype.getCache = unyield(function* () {
                                         ^

        error : 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 new Duo (/usr/lib/node_modules/duo/bin/_duo:403:13)
    at create (/usr/lib/node_modules/duo/bin/_duo:293:13)
    at /usr/lib/node_modules/duo/bin/_duo:280:7
    at next (/usr/lib/node_modules/duo/node_modules/batch/index.js:118:7)

index.js is the sample code provided in the readme

var uid = require('matthewmueller/uid');
var fmt = require('yields/fmt');

var msg = fmt('Your unique ID is %s!', uid());
window.alert(msg);
dominicbarnes commented 8 years ago

What version of node are you using? My guess is you're using node 0.10, which is an outdated and unsupported version of node. (if you need to continue using it, follow these instructions)

ghost commented 8 years ago

It was 0.10.42. Babel works just fine. Thanks for pointing me in the right direction