joliss / broccoli-bower

Load Bower packages into Broccoli
MIT License
10 stars 6 forks source link

TypeError: Object [object Object] has no method 'cleanup' #10

Open tur-nr opened 10 years ago

tur-nr commented 10 years ago

Tried to copy components with the following Brocfile.js and I'm getting a TypeError exception.

Brocfile.js

var staticCompiler = require('broccoli-static-compiler')
  , bowerTrees = require('broccoli-bower');

module.exports = staticCompiler(bowerTrees(), {
  srcDir: '/',
  destDir: '/vendor'
});

Trace Stack

TypeError: Object [object Object] has no method 'cleanup'
    at Builder.cleanup (./node_modules/broccoli/lib/builder.js:128:12)
    at ./node_modules/broccoli/lib/cli.js:47:19
    at ./node_modules/broccoli/node_modules/rsvp/dist/rsvp.js:1149:38
    at $$$internal$$tryCatch (./node_modules/broccoli/node_modules/rsvp/dist/rsvp.js:464:16)
    at $$$internal$$invokeCallback (./node_modules/broccoli/node_modules/rsvp/dist/rsvp.js:476:17)
    at $$$internal$$publish (./node_modules/broccoli/node_modules/rsvp/dist/rsvp.js:447:11)
    at $$$internal$$publishRejection (./node_modules/broccoli/node_modules/rsvp/dist/rsvp.js:389:7)
    at $$rsvp$asap$$flush (./node_modules/broccoli/node_modules/rsvp/dist/rsvp.js:1525:9)
    at process._tickCallback (node.js:419:13)
    at Function.Module.runMain (module.js:499:11)

Build failed
asermax commented 10 years ago

Just had this issue: bowerTrees returns an array of trees, you have to always merge them using broccoli-merge-trees.

tur-nr commented 9 years ago

Is there a reason for an array trees, would it not be better to merge trees from within the module?