EmberSherpa / ember-element-resize-detector

Super-optimized cross-browser resize listener for elements.
https://embersherpa.github.io/ember-element-resize-detector
MIT License
12 stars 9 forks source link

Issue being used as a nested addon #3

Open nmcclay opened 8 years ago

nmcclay commented 8 years ago
app.import is not a function
TypeError: app.import is not a function
    at Class.module.exports.included (/Users/nmcclay/git/light-table/node_modules/ember-light-table/node_modules/ember-element-resize-detector/index.js:20:17)
    at /Users/nmcclay/git/light-table/node_modules/ember-cli/lib/models/addon.js:244:32

I encountered this issue trying to upgrade ember-light-table and noticed this problem.

    if (!process.env.EMBER_CLI_FASTBOOT) {
      app.import('vendor/element-resize-detector/element-resize-detector.js');
    }
nmcclay commented 8 years ago

Able to reproduce with ember 2.6 and a new addon project.

nmcclay commented 8 years ago

This issue seems directly related to this discussion about nested addons: https://github.com/ember-cli/ember-cli/issues/3718

Moving ember-light-table to a peerDependency seemed to resolve this issue... so I'm moving on.

GCorbel commented 8 years ago

@nmcclay I have the same issue but I'm contributing for this addon. I cannot add ember-light-table as peerDependency. Is there a solution?