ef4 / ember-browserify

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

Build breaks when sourcemaps options are not defined #10

Closed lsocrate closed 9 years ago

lsocrate commented 9 years ago

I'm running node v0.10.33, npm v2.1.9, ember-cli v0.1.4 and ember-browserify v0.3.5. I use browserify with moment and MD5. Currently getting.

$ ember serve
version: 0.1.4
valid watchman found, version: [3.0.0]
Cannot call method 'indexOf' of undefined
TypeError: Cannot call method 'indexOf' of undefined
    at Class.module.exports.included (/home/lsocrate/Projects/touchdown/touchdown-cli/node_modules/ember-browserify/lib/index.js:13:47)
    at EmberApp.<anonymous> (/home/lsocrate/Projects/touchdown/touchdown-cli/node_modules/ember-cli/lib/broccoli/ember-app.js:217:15)
    at Array.filter (native)
    at EmberApp._notifyAddonIncluded (/home/lsocrate/Projects/touchdown/touchdown-cli/node_modules/ember-cli/lib/broccoli/ember-app.js:212:45)
    at new EmberApp (/home/lsocrate/Projects/touchdown/touchdown-cli/node_modules/ember-cli/lib/broccoli/ember-app.js:203:8)
    at Object.<anonymous> (/home/lsocrate/Projects/touchdown/touchdown-cli/Brocfile.js:9:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

The problem seems to be reading app.options.sourcemaps without checking for undefined values or setting a default value.

knownasilya commented 9 years ago

Have PR #12 which addresses the issue, waiting for merge.

ef4 commented 9 years ago

@knownasilya's PR is merged and released as 0.3.6.