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

modifierManagerCapabilities is not a function #14

Closed
gossi opened this issue Aug 28, 2019 · 7 comments
Closed

modifierManagerCapabilities is not a function #14

gossi opened this issue Aug 28, 2019 · 7 comments

Comments

@gossi
Copy link

gossi commented Aug 28, 2019

We've seen this error popping up at various projects. The reason being we have the dependency: "@ember/render-modifier": "^1.0.0". With 1.0.0 it was working fine but after an upgrade to 1.0.1 we are seeing this error message:

Uncaught (in promise) TypeError: Ember._modifierManagerCapabilities is not a function
    at vendor.js:89048
    at RuntimeResolver._lookupModifier (vendor.js:20216)
    at RuntimeResolver.lookupModifier (vendor.js:20127)
    at CompileTimeLookup.lookupModifier (vendor.js:16613)
    at LazyCompiler.resolveModifier (vendor.js:52478)
    at vendor.js:51567
    at Compilers.compile (vendor.js:51537)
    at compile (vendor.js:52230)
    at LazyCompiler.add (vendor.js:52424)
    at CompilableProgram.compile (vendor.js:52188)

Our workaround was to specify the version of this package to v1.0.0. That said it doesn't necessarily have to be this package cause it, but can be a very mixed constellation of packages that is causing it.

@buschtoens
Copy link

buschtoens commented Aug 28, 2019

Ember._modifierManagerCapabilities was only added 16 days ago:

https://github.com/emberjs/ember.js/blame/4ae6015c558d42a570342996f9c7769c2246dfcf/packages/ember/index.js#L531

Previously it was a typo: _modifierManagerCapabilties

Updating to ember-source@^3.13.0-beta.3 resolves this as it contains the fix.

@rwjblue
Copy link
Member

rwjblue commented Aug 28, 2019

Ya, but ember-polyfills/ember-modifier-manager-polyfill#10 specifically added support in the polyfill for consistently importing import { capabilities } from '@ember/modifier'; (e.g. the new name is always present even before 3.13.0-beta.3).

@rwjblue
Copy link
Member

rwjblue commented Aug 28, 2019

[email protected] directly depends on [email protected] (here) so we should have the most recent version with that fix in it...

@gossi - Can you share a bit of info:

  • yarn list ember-modifier-manager-polyfill
  • your ember-source version

@gossi
Copy link
Author

gossi commented Aug 28, 2019

$ yarn list ember-modifier-manager-polyfill ember-source
yarn list v1.17.3
warning Filtering by arguments is deprecated. Please use the pattern option instead.
├─ [email protected]
└─ [email protected]
✨  Done in 0.71s.
"ember-source": "https://s3.amazonaws.com/builds.emberjs.com/canary/shas/755ea5dbe65d91e0d650707da740aa6900d0a755.tgz"

Copy link
Member

rwjblue commented Aug 28, 2019

Ahh, so I think you need to update your canary SHA. The polyfill uses semver.gte('3.13.0-beta.3') to decide what to do (RE: setting up Ember. _modifierManagerCapabilities) but your version is 3.14.0 (canary) which is "greater" than 3.13.0-beta.3. Unfortunately, your canary SHA predates the fix for Ember. _modifierManagerCapabilities so the polyfill decides "you have the fix", but in reality you don't.

There really isn't much we can do here for this AFAICT, I'd suggest updating your canary SHA (npx ember-source-channel-url canary -w).

@gossi
Copy link
Author

gossi commented Aug 29, 2019

That's true, updated the SHA this morning (wo/ even reading it). I love it when things magically work :)

@rwjblue
Copy link
Member

rwjblue commented Aug 29, 2019

OK, sorry for the troubles here @gossi. Going to go ahead and close this one.

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

3 participants