ember-cli-stencil icon indicating copy to clipboard operation
ember-cli-stencil copied to clipboard

Error upon install without any components loaded

Open eshtadc opened this issue 6 years ago • 6 comments

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 avatar Jan 15 '19 18:01 eshtadc

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

eshtadc avatar Jan 15 '19 18:01 eshtadc

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

alexlafroscia avatar Jan 17 '19 19:01 alexlafroscia

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 avatar Jan 17 '19 19:01 alexlafroscia

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.

alexlafroscia avatar Jan 17 '19 20:01 alexlafroscia

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

odoe avatar May 29 '19 18:05 odoe

Closed by #7

alexlafroscia avatar Aug 08 '19 18:08 alexlafroscia