table-dragger icon indicating copy to clipboard operation
table-dragger copied to clipboard

Cannot read property 'CustomEvent' of undefined: Angular 8

Open mintos2000 opened this issue 6 years ago • 8 comments

I am getting an error below in my angular 8 application Uncaught TypeError: Cannot read property 'CustomEvent' of undefined at Object. (table-dragger.js:4098)

I am using Typescript : 3.5.3 It works okay with Angular 6 (typescript: 2.5) just wondering if you have any idea what can cause this error

thanks

mintos2000 avatar Nov 26 '19 09:11 mintos2000

I am getting the same error.

RSPaul avatar Feb 03 '20 09:02 RSPaul

Same error with Svelte

MindSetFPS avatar Jul 29 '20 22:07 MindSetFPS

I experienced the same error: it's caused by the version of webpack, it's not related to the code of table dragger. I think this could be fixed easily by upgrading the version of webpack in package.json.

@sindu12jun if you have time to do the upgrade it would be great, otherwise let me know, I might find time to open a branch and do it myself

adrdilauro avatar Sep 25 '20 12:09 adrdilauro

Actually, no. The real culprit of this bug is the dependency on "dragula": https://github.com/bevacqua/dragula.

adrdilauro avatar Sep 25 '20 13:09 adrdilauro

Actually, no. The real culprit of this bug is the dependency on "dragula": https://github.com/bevacqua/dragula.

So, how can I fix this problem?

Nutrii182 avatar Jul 28 '22 17:07 Nutrii182

I was having the same error but couldn't figure out how global is undefined when module.exports is defaulted to and empty object. when importing dragula dependency. So as a workaround, you can load it as a normal javascript script file (script tag of type="text/javascript") and then use tableDragger.default.

Curlack avatar Jan 10 '23 17:01 Curlack

Any updation for the above issues?

sreejithc1996 avatar May 20 '23 15:05 sreejithc1996

Is this issue resolved? Or any alternative solution for this library is there for angular ?

mustafa-kpi avatar Sep 29 '23 16:09 mustafa-kpi