Skip to content

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

@Shishouille

Description

@Shishouille

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions