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

^v0.1.2 cached is undefined #81

Open
betocantu93 opened this issue May 21, 2021 · 7 comments
Open

^v0.1.2 cached is undefined #81

betocantu93 opened this issue May 21, 2021 · 7 comments

Comments

@betocantu93
Copy link

betocantu93 commented May 21, 2021

Hello, not really sure if there's anything special about our setup... yet, but wanted to open an issue for documentation, we had to lock-in for v0.1.1 because starting from 0.1.2 cached import resolves undefined. Gonna try to create a repro.

"ember-source": "3.20.2"
"ember-cli": "3.20.0"

@SergeAstapov
Copy link

Confirm, see the same behavior with v0.1.3.

Here is transpiled output:
ember-cached-decorator-polyfill #81

Interestingly, debugger never gets to this line https://github.com/ember-polyfills/ember-cached-decorator-polyfill/blob/main/lib/transpile-modules.js#L62

I wonder if something else strips the import before...

@kellyselden
Copy link

We are getting the following build error when trying to update to 0.1.2.

@glimmer/tracking does not have a cached export

@rwjblue
Copy link
Member

rwjblue commented May 28, 2021

@kellyselden generally speaking, that seems like it would be caused by running with too old of an ember-cli-babel version (this error comes from babel-plugin-ember-modules-api-polyfill, which uses the list of known modules <-> Global's paths from ember-rfc176-data). Can you double check the version of ember-cli-babel that is used by whomever is using @cached?

@rwjblue
Copy link
Member

rwjblue commented May 28, 2021

@betocantu93 / @SergeAstapov - have y'all been able to isolate a reproduction?

@kellyselden
Copy link

Thanks @rwjblue, I'll try that first.

@betocantu93
Copy link
Author

betocantu93 commented May 28, 2021

@rwjblue Here's a repro: https://github.com/betocantu93/bug-repro

Can you double check the version of ember-cli-babel that is used by whomever is using @cached?

Indeed, one of my deps where @cached is used has "ember-cli-babel": "^7.13.0" which seems to be causing the issue

@SergeAstapov
Copy link

I've got trolled by [email protected] which has pinned version of ember-cli-babel in https://github.com/ember-a11y/ember-a11y-testing/blob/v3.0.2/package.json#L29 🙈

Thanks for pointing out into root cause @rwjblue!

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