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

Cannot read property 'CustomEvent' of undefined: Angular 8 #42

Open
mintos2000 opened this issue Nov 26, 2019 · 8 comments
Open

Cannot read property 'CustomEvent' of undefined: Angular 8 #42

mintos2000 opened this issue Nov 26, 2019 · 8 comments

Comments

@mintos2000
Copy link

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

@RSPaul
Copy link

RSPaul commented Feb 3, 2020

I am getting the same error.

@MindSetFPS
Copy link

Same error with Svelte

@adrdilauro
Copy link

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
Copy link

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

@Nutrii182
Copy link

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?

@Curlack
Copy link

Curlack commented Jan 10, 2023

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.

@sreejithc1996
Copy link

Any updation for the above issues?

@mustafa-kpi
Copy link

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

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

8 participants