ef4 / ember-browserify

ember-cli addon for easily loading CommonJS packages from npm via browserify.
MIT License
172 stars 28 forks source link

0.5.4 of caching writer breaks build output #8

Closed sohara closed 9 years ago

sohara commented 9 years ago

In our app, build hangs with the error: Cannot read property 'length' of undefined.

This error is in the promise-map-series library at line 4 of index.js. The function is supposed to receive an array as first arg but it is undefined. It's called from broccoli-caching-writer on line 74 of index.js: return mapSeries(this.inputTrees, readTree), so apparently this.inputTrees is undefined at that point of execution. It's called by caching-browserify.js at line 74:

    return mapSeries(self.watchPackages, function(pkg){
      var dir = pkg.__dirname;
      if (dir !== self.root && !self.watchedNodeModules[dir]){
        self.watchedNodeModules[dir] = true;
        self.inputTrees.push(dir);
        return readTree(dir).then(function(treeSrc){
          self._inputTreeCacheHash.push(helpers.hashStrings(self.keysForTree(treeSrc)));
        });
      }
    });

I'm not exactly sure what's going on here, but possible related to your recent issues on the broccoli-caching-writer and core-object repos? For I've forked so I could use 0.3.1 with a locked dependency on broccoli-caching-writer at 0.5.2.

ef4 commented 9 years ago

Yeah, sorry, I caused some churn in broccoli-caching-writer and core-object. I think this issue is caused by https://github.com/rwjblue/broccoli-caching-writer/pull/25

AFAIK, you can lock your broccoli-caching-router dep by putting "0.5.2" in your own app's package.json -- since that version satisfies the constraint in ember-browserify, it will share your copy.

ef4 commented 9 years ago

Published v0.3.3 to protect people from this bug.