ef4 / ember-browserify

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

Cannot read property 'sourcemaps' of undefined #92

Closed kellyselden closed 7 years ago

kellyselden commented 7 years ago

I'm trying to update an app to ember-cli@2.7.0. I'm getting the error Cannot read property 'sourcemaps' of undefined from /node_modules/ember-browserify/lib/index.js:21:39. When I add a console.log(Object.keys(app)) right above that line, I get:

[ 'project',
  'name',
  'env',
  'isProduction',
  'registry',
  'bowerDirectory',
  'tests',
  'hinting',
  'options',
  'vendorFiles',
  '_styleOutputFiles',
  '_scriptOutputFiles',
  'legacyFilesToAppend',
  'vendorStaticStyles',
  'otherAssetPaths',
  'legacyTestFilesToAppend',
  'vendorTestStaticStyles',
  'trees' ]
[ '_super',
  'parent',
  'project',
  'ui',
  'addonPackages',
  'addons',
  'addonDiscovery',
  'addonsFactory',
  'registry',
  '_didRequiredBuildPackages',
  'nodeModulesPath',
  'treePaths',
  'treeForMethods',
  '_addonsInitialized',
  'app' ]

So, one of the calls doesn't have the app.options object. When I add app.options && to the line, the upgrade goes otherwise smoothly. I didn't change ember-browserify versions between ember-cli 2.6.3 and 2.7.0. It may be that there is a bug in ember-cli that should be sending you the options hash and isn't.

asakusuma commented 7 years ago

This hopefully will be addressed by https://github.com/ef4/ember-browserify/pull/93/