ember-power-calendar icon indicating copy to clipboard operation
ember-power-calendar copied to clipboard

meta-addons are not properly detected

Open Exelord opened this issue 6 years ago • 6 comments

meta-addons are not properly detected when ember-power-calendar is used in an addon which is consumed by the app

// addon package.js

"dependencies": {
    "ember-power-calendar": "0.9.2",
    "ember-power-calendar-moment": "0.1.3"
}

You have installed "ember-power-calendar" but you don't have any of the required meta-addons to make it work. Please, explicitly install 'ember-power-calendar-moment' or 'ember-power-calendar-luxon' in your app

Exelord avatar Oct 10 '18 16:10 Exelord

I can confirm the same problem. I have an addon and app organized in monorepo and it's failing although ember-power-calendar-moment is installed.

synaptiko avatar Nov 19 '18 16:11 synaptiko

👍 this is the culprit: https://github.com/cibernox/ember-power-calendar/blob/master/index.js#L12

I think maybe we can use this.ui.writeError instead of throwing an error? Not a great fix, but I'm not sure if there's an alternative.

mattmarcum avatar Dec 12 '18 17:12 mattmarcum

Has anyone found a work around? This is causing some grief.

jherdman avatar Feb 26 '19 21:02 jherdman

I am in the same boat as @jherdman

pkmh avatar Mar 27 '19 18:03 pkmh

actually, nevermind. I was able to resolve this by adding ember-power-calendar-moment and changing some package versions

pkmh avatar Mar 27 '19 18:03 pkmh

As far as I can tell, ember-power-calendar properly detects the meta addons if they're used directly by the same addon that includes ember-power-calendar.

If you're seeing this bug, it may be because ember-power-datepicker is present, and it has a dependency on ember-power-calendar but not on either of the meta packages. Which means the only way to make ember-power-calendar happy about this is to add one of the meta packages to the host app, since you can't add it to ember-power-datepicker.

ef4 avatar May 28 '19 20:05 ef4

Old issue, but only as info... starting with v0.21 and now also in v1.0 meta packages need to be registered in app.js to get work the addon / addons with this package as dependency If you dont register you will get an error

mkszepp avatar Mar 15 '24 17:03 mkszepp