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

Compatibility with ember 2.18 #25

Open
shibulijack-fd opened this issue Dec 11, 2019 · 8 comments
Open

Compatibility with ember 2.18 #25

shibulijack-fd opened this issue Dec 11, 2019 · 8 comments

Comments

@shibulijack-fd
Copy link

Uncaught TypeError: Cannot read property '@ember-data/model/index' of undefined
at patchDataDecorators (vendor.js:sourcemap:88912)

Addon has decorators & polyfill
ember version: 3.13

Host app
ember version: 2.18

@shibulijack-fd
Copy link
Author

shibulijack-fd commented Dec 12, 2019

Okay, after some digging into the issue, I figured out that the problem is with https://github.com/pzuraq/ember-decorators-polyfill/blob/bccd9602325499b5087e27524ba964f9d30db73e/vendor/ember-decorators-polyfill/data-fix.js#L50

mainRequire.entries is undefined but require.entries contains the dictionary. Replacing mainRequire with require seems to get it to working.

@shibulijack-fd
Copy link
Author

@pzuraq Thoughts?

@pzuraq
Copy link
Collaborator

pzuraq commented Dec 12, 2019

That seems off, require shouldn’t be the real require at that point, it should have replaced the real require. I won’t have time to do dig in for a while, but if you can put together a failing test case and bugfix I can review it.

@shibulijack-fd
Copy link
Author

Unfortunately I don’t have the time to work on it. For now, I’ve skipped the data fix from being added to the vendor in my forked repo

@Mifrill
Copy link

Mifrill commented Mar 12, 2021

I've got another issue but Compatibility with 2.18:

Cannot set property _dependentKeys of #<DecoratorDescriptor> which has only a getter

"ember-source": "~2.18.0",
@pzuraq any updates for ember 2.18 compatibility?

@rwjblue
Copy link
Member

rwjblue commented Mar 12, 2021

Best bet here is to add tests to our CI for ember-source@2.18

@Mifrill
Copy link

Mifrill commented Mar 13, 2021

Hey @shibulijack-fd is it working with no issues for you on 2.18 version?

@Mifrill
Copy link

Mifrill commented Apr 13, 2021

It looks like for me it's a different issue, not related to Compatibility with 2.18 as I mentioned before:

Cannot set property _dependentKeys of # which has only a getter

"ember-source": "~3.0.0",
@rwjblue shall I create another issue for this?

Probably should be added setter here:

get _dependentKeys() {
let params = DECORATOR_PARAMS.get(this) || [];
return params.filter(item => typeof item === 'string');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants