Only change I made was upgrade from 2.14.2 -> 2.16.2 and now when I run tests, this error causes a couple tests to fail (everything else works):
test-module-for-component.js:334 TypeError: Cannot read property 'concat' of undefined
at WrappedBuilder.compile (ember.debug.js:4042)
at ComponentLayoutBuilder.compile (ember.debug.js:3935)
at compileLayout (ember.debug.js:3916)
at Cache._emberMetal.Cache.owner [as func] (ember.debug.js:17622)
at Cache.get (ember.debug.js:25086)
at Environment.getCompiledBlock (ember.debug.js:17693)
at OutletComponentManager.layoutFor (ember.debug.js:15625)
at ember.debug.js:2662
at AppendOpcodes.evaluate (ember.debug.js:1016)
at VM.next (ember.debug.js:8190)
Which is apparently this line:
One of the tests that fails looks like this:
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import wait from 'ember-test-helpers/wait';
moduleForComponent('content-editable', 'Integration | Component | content editable', {
integration: true
});
test('it renders', function(assert) {
this.set('text', 'Here is some text');
this.set('editing', 'true');
// Template block usage:
this.render(hbs`
{{content-editable value=text editable=editing class="d-inline-block" title="Test" id="test"}}
`);
assert.equal(this.$().html().trim(), '<div title="Test" data-test-id="content-editable" id="test" class="d-inline-block -editable ember-view" contenteditable="true" style="color: rgb(65, 65, 65);">Here is some text</div>');
})
Any tips to help debug?
@atomkirk can you great an https://ember-twiddle.com/ example to reproduce the issue?
I would LOVE to but ember twiddle only supports up to 2.12. Is there a way to update it to 2.16.2?
That's such a great tool I'd love to see it updated.
You can drop the addons section in the twiddle.json, and then choose release channel from the dependencies.
Also, this error looks like a mis-match between Ember versions. The template compilation output changed between these two versions, and the error you are getting seems to infer that the inline precompiled template has not been re-compiled with your new Ember version's template compiler.
oh interesting. I followed the upgrade instructions here:
https://github.com/ember-cli/ember-cli/releases/tag/v2.16.2
namely rm -rf node_modules dist tmp to delete existing compiled stuff and ember init to make sure my package.json deps got updated to the right versions.
Do you have a suggestion of what I should try?
@atomkirk - Are you using ember-source (from npm) or are you consuming via Bower? If bower, you probably also want to rm -rf bower_components.
@atomkirk ping
I started my project with ember-cli, so I'm including everything via npm and I run ember init on each upgrade to make sure my package.json file looks like it would with a new project
Closing for now (seems to have gone stale), happy to reopen if this is still an issue...