Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Ember._setComputedDecorator is not a function #434

Open
danielspaniel opened this issue Apr 12, 2019 · 7 comments
Open

TypeError: Ember._setComputedDecorator is not a function #434

danielspaniel opened this issue Apr 12, 2019 · 7 comments
Labels
5.x Issues affecting the 5.x series bug

Comments

@danielspaniel
Copy link

danielspaniel commented Apr 12, 2019

Howdy, I was on
"ember-decorators": "5.2.0",
"@ember-decorators/argument": "1.0.0-beta.2",
"@ember-decorators/babel-transforms": "5.1.3",
with cli, data and source at => 3.8

then i updated to 3.9 and I am getting this error

TypeError: Ember._setComputedDecorator is not a function
because, well it is no longer a function anymore in Ember 3.9 ( seems pretty likely )

Should I update do ember-decorators 6.0.0 and then convert to using them from @ember/object + use the polyfill => till i get to 3.10 ember ??

Also, on a related note. You got rid of @ember-decorators/data but the polyfill does not have those decorators in @ember/object .. can you tell me where they went ? me confused

@pzuraq
Copy link
Contributor

pzuraq commented Apr 12, 2019

The latest version of ember-decorators v5 should work.

@ember-decorators/argument is going to need some work to transition back to stage 1, it won't be usable with the polyfill unfortunately 😕

@danielspaniel
Copy link
Author

problem is I am getting this error with ember-decorators => v5.2 and ember 3.9

i guess I will go back to ember 3.8 because this seems v6 like it is not really done yet ( integrated with ember 3.9 ) or polyfill

@pzuraq
Copy link
Contributor

pzuraq commented Apr 12, 2019

v6 is complete and ready. @ember-decorators/argument, which is a separate library that isn't currently being maintained too much, is not ready unfortunately, but I recommend upgrading if you can.

@pzuraq
Copy link
Contributor

pzuraq commented Apr 12, 2019

You may also want to run a yarn upgrade to ensure you have the latest version, because we fixed that bug with 3.9 in 5.1.4: https://github.com/ember-decorators/ember-decorators/blob/v5.1.4/packages/utils/addon/computed.js#L24

It's possible you have another addon including a different version of this addon

@danielspaniel
Copy link
Author

ok .. sounds good but what about ember-data decorators ( where do i get those from ? ) with v6 and polyfil ?

@pzuraq
Copy link
Contributor

pzuraq commented Apr 12, 2019

You can use DS.attr, DS.belongsTo, and DS.hasMany directly now.

class Person extends Model {
  @DS.attr() name;
}

Make sure you add parenthesis

@danielspaniel
Copy link
Author

danielspaniel commented Apr 12, 2019

got it , thanks , might be good to slap that there in the docs ( the v6.0.0 release notes maybe )

@buschtoens buschtoens added 5.x Issues affecting the 5.x series bug labels Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.x Issues affecting the 5.x series bug
Projects
None yet
Development

No branches or pull requests

3 participants