Open thoresuenert opened 3 years ago
Did you figure this out? What ember versions are you using and are there anything notable about your app? This add-on is reasonably popular and there is CI testing all supported LTS versions as well as ember release/beta/canary, so it's probably something specific in your setup or interaction with other admins you are using.
I am also experiencing the exact same issue.
Update: I installed this in the consuming application and the error cleared up.
Edit
The following post actually works, the fix was to install the add-on in the production dependencies:
ember install ember-element-helper --save
@chancancode, @rwjblue , we should mention it in the installation procedure. ↳ See https://github.com/tildeio/ember-element-helper/pull/65.
Same issue here when trying your add-on in my add-on, which runns with ember-cli@3.24
.
The use of the -cc
(to create a Classic Component) is just to match the example from your README, but the same happens when creating a Template-Only component (flag -nc
)
ember generate component -cc toto
{{#let (element this.tagName) as |Tag|}}
<Tag class="my-tag">hello</Tag>
{{/let}}
Its JS class is already populated:
import Component from '@ember/component'
export default class TotoComponent extends Component {}
import { module, test } from 'qunit'
import { setupRenderingTest } from 'ember-qunit'
import { render } from '@ember/test-helpers'
import { hbs } from 'ember-cli-htmlbars'
module('Integration | Component | toto', function(hooks) {
setupRenderingTest(hooks)
test('it renders', async function(assert) {
await render(hbs`<Toto @tag="span" />`)
assert.dom().hasText('hello')
})
})
Assertion Failed:
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.
is this still an issue? can we close? <3
When I use the following code directly in
application.hbs
it works:Scenario with error: This component comes from an addon
throws the following error:
What do I miss here?