-
Notifications
You must be signed in to change notification settings - Fork 41
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
backend.backend is not a constructor #484
Comments
It’s a bit weird that the issue would only show up now, considering dnd-multi-backend has apparently always treated backends as constructors. The main backends are not actually constructors. Can you file or search for an issue on LouisBrunner/dnd-multi-backend ? Note that we’re still using 3.x as I couldn’t get 4.0 to work at all, so that’s another one. |
(Oh, I figured out that dnd-multi-backend 4.0 is a really breaking change, requiring using react-dnd-cjs and all the -cjs versions of all those packages. I won’t make my dependents do that (and then switch back), so no v4, only v5 which will fix this apparently.) Upshot is we probably need a maintenance release on 3.x, or a workaround wrapper class to make every backend a constructor even when it’s not. I think 4.0 was mainly react-dnd-centric changes, which is why 3.x still works with dnd-core v9 if you partially apply your backends to pass options in. @LouisBrunner any chance of a 3.x fix? |
See the issue on dnd-multi-backend. Essentially, you can also work around this by transpiling to ES5 in all cases. Angular 8 I believe will try to deliver ES2015 to capable browsers, but if you turn that off (however that works), this will probably work again. I would probably just wait for another patch release that upgrades to dnd-multi-backend 5.0.0, which is now in alpha and will hopefully include my PR. |
@cormacrelf |
Nah don’t worry about it if you’ve already got 5 off the ground |
Any news on when the next release will be out? |
Just updated to version 1.3.2 of @angular-skyhook/multi-backend and 1.3.0 of @angular-skyhook/core and I am getting the following error:
ERROR TypeError: backend.backend is not a constructor
at MultiBackend.js:239
at Array.forEach ()
at new _default (MultiBackend.js:227)
at index.js:60
at angular-skyhook-multi-backend.js:45
at createDragDropManager (factories.js:4)
at angular-skyhook-core.js:1543
at ZoneDelegate.invoke (zone-evergreen.js:359)
at Zone.run (zone-evergreen.js:124)
at NgZone.runOutsideAngular (core.js:39571)
Did I miss some breaking change between 1.2.1 and 1.3.0/1.3.2 ?
The text was updated successfully, but these errors were encountered: