Closed knownasilya closed 6 years ago
Converting it to page-title directly still errors, see the error here: https://gloucesterma.mapgeo.alpha1.appgeo.com/dashboard/
Looks like helpers with a - are treated as components? So the {{title
was a red herring since it was always converted to {{page-title
any ways. Interesting thing is that it doesn't error locally when running on my machine. The only think I'm doing differently in alpha is using EMBER_ENV=alpha
when building.
Didn't notice that 1.1.0 was out, trying that now..
Nope, still an issue.
Ah, alpha was already using 1.1 but local was 1.0.2, so the issue is somewhere in the update from 1.0.2 to 1.1.0.
Can you give me the template that I can use to test?
@rwjblue here's a repro https://github.com/knownasilya/ab-repro template is here https://github.com/knownasilya/ab-repro/blob/master/app/templates/application.hbs
Thank you very much for putting together an awesome reproduction, it made tracking things down super easy!
Seen same issue on "ember-source": "~3.1.0" Can reproduce this problem only on prod build, ind dev build - all ok
Can you create a reproduction repo which demonstrates the problem (if so please create a new issue so we can track things down and get it fixed...)
@rwjblue this is my code issue, sorry for bothering you :( I have dynamic component name resolution logic like
function componentName(modelName, viewType) {
return `meta-attribute/${modelName}/x-${viewType}`;
}
if component having this name resolved in app - all ok, if not - I see this issue.
Prod/Non-prod behavour - is my logic how to get modelName.
I have logic like let modelName = model.constructor.name
but in prod, constructor class may have short name (due to minification). (meta->g)
Issue solved for me by let modelName = model.constructor.modelName
.
To prevent users from tricky debugging, error stack may be little bit usable, for example it may contain error like -
I'm trying to render unresolved componenent "componentName"
.
Great job tracking this down! Seems like we could write a test that emulates the issue you are seeing (so that we can track it down). I’m thinking of essentially a test like this one but using {{component ‘does-not-exist’}}
and asserting empty DOM. Would you mind sending a PR with that test?
Done, but this is not ember-angle-bracket-invocation-polyfill
issue.
Non prod builds users have pretty meaningful error like:
Uncaught Error: Assertion Failed: Could not find component named "does-not-exist" (no component or template with that name was found)
But, this issue may be in prod builds due to removed checks.
https://github.com/emberjs/ember.js/blob/master/packages/@ember/-internals/glimmer/lib/resolver.ts#L126 https://github.com/emberjs/ember.js/blob/master/packages/@ember/-internals/glimmer/tests/integration/components/contextual-components-test.js#L745
I get this error:
The component it tries to evaluate is
page-title
, but that addon supports using justtitle
which is transformed via AST. See my comment in that project https://github.com/tim-evans/ember-page-title/issues/123#issuecomment-395131883I'm testing converting it to an explicit
page-title
.