Closed buschtoens closed 5 years ago
Btw can I somehow directly influence this @glimmer/env
DEBUG
flag? I would prefer my CI tests to run against an environment that is as close to production as possible.
Can you share a reproduction repo? I'm trying to determine if the template compilation is happening in the correct environment...
Sure, I'll prep one later in the evening.
Thank you!
Interestingly, it seems like it isn't that simple. I can't directly reproduce the error, but I'll dig deeper in the next days.
https://github.com/buschtoens/repro-implicit-component-helper-argument
After hours of debugging, I gave up and added a helper that takes care of the problem in production. It's obvious there's some compilation issue, but I couldn't track down where.
import { warn } from '@ember/debug';
import { helper } from '@ember/component/helper';
function helperFn(params) {
const [node, error] = params;
warn(error);
return node;
}
// https://github.com/emberjs/ember.js/issues/17154
Object.defineProperty(helperFn, 'name', {
value: '-assert-implicit-component-helper-argument',
});
export default helper(helperFn);
I would love to add some helpfull info there, but I can only say that I have same issue :(
This should be fixed now! please comment if you still running into this and we can reopen!
@chancancode if now have this error on https://github.com/broerse/ember-cli-blog if I update to ember-cli 3.9.0
Latest canary dec37c32654b2a2ccae190611e9eca72f2277f29 breaks when yielded / contextual components are directly invoked with arguments using just the path expression without the
{{component}}
helper:However, this only happens in production builds. I assume that this is because of the
DEBUG
flag, which will befalse
in production.https://github.com/emberjs/ember.js/blob/dec37c32654b2a2ccae190611e9eca72f2277f29/packages/%40ember/-internals/glimmer/lib/helpers/-assert-implicit-component-helper-argument.ts#L7-L36
This was working fine in
v3.6.0-beta.1
, so it happened somewhere here:v3.6.0-beta.1...dec37c3
.