I guess you didn't upgrade step by step but moved from 2.18 to 3.8 directly, did you? In 3.2 a deprecation was added that computed properties must be defined using defineProperty
if object is already created. The functionality was removed in 3.5. Setting a computed property dynamically using set
or a property on an object passed to EmberObject.create()
is not supported anymore.
This has been deprecated in 3.2 and removed in 3.5:
import Object as EmberObject, { computed } from '@ember/object';
EmberObject.create({
foo: computed('bar', function() {
// ...
})
});
EmberObject.extend({
init() {
this._super(...arguments);
this.set('foo', computed('bar', function() {
// ...
}));
}
});
You should migrate to:
import Object as EmberObject, { computed } from '@ember/object';
EmberObject.extend({
foo: computed('bar', function() {
// ...
})
}).create();
import { defineProperty } from '@ember/object';
EmberObject.extend({
init() {
this._super(...arguments);
defineProperty(this, 'foo', computed('bar', function() {
// ...
}));
}
});
This old syntax wasn't a public API. While Ember does not introduce breaking changes to public API, private APIs may be changed at any time. If core team considers them as widely used, they are deprecated and removed after next LTS release. This was the case here.
Normally it's safer and easier to do a step to step upgrade from LTS to LTS. In that case you don't miss helpful deprecation messages.
Please also have a look into the entry in deprecation guide even so it's a little bit to technical and should have had more real world examples in my opinion.