Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ember-element-helper doesn't work since update to 0.8.5 #117

Open
Shishouille opened this issue Oct 24, 2023 · 2 comments
Open

ember-element-helper doesn't work since update to 0.8.5 #117

Shishouille opened this issue Oct 24, 2023 · 2 comments

Comments

@Shishouille
Copy link

Shishouille commented Oct 24, 2023

Helloo,

With only updating the dependencies, ember-element-helper is not working properly anymore. When calling it this way:

{{#let (element (or-else @as "div")) as |Element|}}
  <Element class={{this.classnames}} {{css-vars this.style}} ...attributes>
    {{yield}}
  </Element>
{{/let}}

We have this Stack Trace:
image

Directing us to this assertion:

export default helper(function () {
  // This helper (`element`, as opposed to `-element`) mostly exists to satisfy
  // things like `owner.hasRegistration('helper:element')`. The AST transform
  // replaces all usages of `(element ...)` into `(component (-element ...))`
  // so if this helper is invoked directly, something is wrong.

  assert('The `element` helper polyfill encountered an unexpected error. ' + 'Please report the issue at http://github.com/tildeio/ember-element-helper ' + 'with the usage and conditions that caused this error.');
  return null;
});

Here's the main dependencies versions:

    "@embroider/compat": "3.2.3",
    "@embroider/core": "3.3.0",
    "@embroider/router": "2.1.4",
    "@embroider/webpack": "3.2.0",
    "@ember/render-modifiers": "2.1.0",
    "@glimmer/component": "1.1.2",
    "@glimmer/tracking": "1.1.2",
    "@glint/core": "^1.2.1",
    "@glint/environment-ember-loose": "^1.2.1",
    "@glint/environment-ember-template-imports": "1.2.1",
    "@glint/template": "^1.2.1",
    "ember-auto-import": "2.6.3",
    "ember-cli-babel": "8.2.0",
    "ember-modifier": "4.1.0",
    "ember-source": "5.3.0",
    "ember-element-helper": "0.8.5",

As reference to this issue: cibernox/ember-basic-dropdown#713 ; if we use -element it works. What am I missing here? Is there a config I need to add?
For info, I use pnpm and used pnpm dedupe - doesn't change anything.

@esbanarango
Copy link

Same issue here:

@simonihmig
Copy link
Collaborator

The helper code shown above comes from v0.6.0 of the addon, seems you have an old version, maybe coming from another addon's dependencies! Try to deduplicate those!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants