machty / ember-concurrency

ember-concurrency is an Ember Addon that enables you to write concise, worry-free, cancelable, restartable, asynchronous tasks.
http://ember-concurrency.com
MIT License
691 stars 155 forks source link

Help in fixing @computed can only be used on accessors or fields error #458

Closed colenso closed 2 years ago

colenso commented 2 years ago

I'm currently running on ember 3.28, ember-concurrency 1.1.7 and ember-concurrency-decorators 2.0.3 Now I'm trying to move our app to use ember-concurrency v2.2.1 and removed ember-concurrency-decorators. But I'm getting this error: index.js:178 Uncaught Error: Assertion Failed: @computed can only be used on accessors or fields, attempted to use it with xyzTask but that was a method. Try converting it to a getter (e.g. get xyzTask() {})

Googling about this error I came across this post https://githubhot.com/repo/machty/ember-concurrency/issues/416 in which one of the suggestions mentioned was that I make sure that no other package in the project uses ember-concurrency<2 so I upgraded all needed packages and now running yarn why ember-concurrency shows me that v2.21 is being used. However, I'm still getting the same error. I would appreciate help in getting to the bottom of what's causing this error and how to get rid of it.

colenso commented 2 years ago

Figured out that this was caused by another dependency that we were using in our project. Closing this.

LucasHillDex commented 2 years ago

@colenso could you elaborate more on what you found, I think I'm having the same issue.