paulmillr / read-components

Read bower and component(1) components
28 stars 9 forks source link

CLDR + Brunch + read-components throws exception #22

Closed blimmer closed 10 years ago

blimmer commented 10 years ago

I can't seem to get CLDR to work with the overrides and brunch. I originally got the error that I needed to use read-components. I npm-installed it and add this overrides block to my bower.json:

{
  "name": "foo",
  "version": "0.0.0",
  "dependencies": {
   ...
  },
  "devDependencies": {
   ...
  },
  "overrides": {
    "cldr": {
      "main": "plurals.js"
    }
  }
}

Brunch no longer throws the read-components error, but the build fails with this exception:

/usr/local/lib/node_modules/brunch/node_modules/read-components/index.js:90
    pkg[property].forEach(function(item) {
                  ^
TypeError: Object #<Object> has no method 'forEach'
  at /usr/local/lib/node_modules/brunch/node_modules/read-components/index.js:90:19
  at Array.forEach (native)
  at exports.getPackageFiles (/usr/local/lib/node_modules/brunch/node_modules/read-components/index.js:89:13)
  at /usr/local/lib/node_modules/brunch/node_modules/read-components/index.js:118:19
  at /usr/local/lib/node_modules/brunch/node_modules/read-components/index.js:69:7
  at fs.js:266:14
  at Object.oncomplete (fs.js:107:15)

Any ideas?

blimmer commented 10 years ago

Upon further inspection, it looks like this is happening with ember-i18n and brunch. It has a 'main' property, but still seems to freak out even here. I'm going to close this and open an issue with brunch.