alexlafroscia / ember-cli-stencil

Automatic discovery of Stencil.js components for your Ember application
26 stars 7 forks source link

Error upon install without any components loaded #11

Open eshtadc opened 5 years ago

eshtadc commented 5 years ago

I just installed ember-cli-stencil into a blank ember starter project (version 3.5.1) and now it fails to build with the error: Reduce of empty array with no initial value

eshtadc commented 5 years ago

Then I tried installing a sample stencil component from https://stencilcomponents.com/component/rating/ using npm install am-rating --save and added the component to the base application.hbs using the example usage snippet. When trying to build this time I received: Cannot read property 'resolvePackage' of undefined

alexlafroscia commented 5 years ago

Interesting! Sorry about the issues here -- let me see if I can get that sorted out.

alexlafroscia commented 5 years ago

Cannot read property 'resolvePackage' of undefined

This problem seems to stem from the addonDiscovery API having been removed from the Ember CLI without a breaking change on their part 🤷‍♂️ I'll work on finding an alternative means for searching for the packages.

alexlafroscia commented 5 years ago

I was able to find an alternate API to fix that problem, so some progress there!

However, the import for am-rating doesn't match what this addon thinks it should be. I'm not sure if that's an effect of ember-auto-import importing it wrong or the standard shape for what a Stencil collection exposes as the ESM API having changed since I last worked on this package.

odoe commented 5 years ago

Is there a current work around for this issue in ember-cli 3.10.x?

alexlafroscia commented 5 years ago

Closed by #7