Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Identifier '_classCallCheck' has already been declared

RFSolution free asked 5 years ago


Expected behavior

Actual behavior the error says that a function has been declared many times Resources (screenshots, code snippets etc.)


Bartłomiej Malanowski staff commented 5 years ago

Could you please tell us more about your issue? How can we recreate it?


pbaumhart free answered 5 years ago


@Bartłomiej Malanowski has there been a release with a fix for this yet? The lack of accountability from the MDB team here is incredibly troubling.


Bartłomiej Malanowski staff commented 5 years ago

The issue seems to be resolved. Could you please confirm it?


Trela pro commented 5 years ago

I can confirm - Bug doesn't seem to happen in 4.10.0 (Rails 6 + webpack)


spidey priority answered 5 years ago


No offence, but it took more than 6 months and we still have the same problem without any official fix. How long should we still wait for this fix to be applied ? As we can see, @bgoodfl came with a little help but the issue is still present in the official release.


lguenier free commented 5 years ago

Couldn't agree more, it's not complicated to remove duplicate functions in your official release. It feels like all the Dev from mdbootstrap have been away for the pas 6 months...


Thomas Emmanuel free answered 5 years ago


Hi,

Any temporary fix for this issue?

Thanks


Bartłomiej Malanowski staff commented 5 years ago

you can take a look at @bgoodfl's answer above


john.epperson free answered 5 years ago


This is actually a pretty major issue. It means that MDB CANNOT be used by yarn and webpack out of the box. It requires a developer manually modify the the file anytime after yarn is run. In a fully automated environment (as I have), this is untenable.


Bartłomiej Malanowski staff commented 5 years ago

This issue will be fixed in one of the nearest releases


lguenier free commented 5 years ago

I agree with @john.epperson, this is a pretty impressive bug and makes it not fully automatable...


lguenier free commented 5 years ago

@Bartłomiej Malanowski any ETR?


Bartłomiej Malanowski staff commented 5 years ago

It's still on our TODO list


pbaumhart free commented 5 years ago

Any updates on this @Bartłomiej Malanowski? This ticket has been open for 4 months


MDBootstrap staff commented 5 years ago

Right now Bartłomiej is on vacation. From my point of view, I can not guarantee it will be fixed in this release cycle. When he will be back in the office I will remember him about this topic.


lguenier free commented 5 years ago

@Piotr Obrebski @Bartłomiej Malanowski still no news? last comment was 3 weeks ago...


MDBootstrap staff commented 5 years ago

This issue is a major one and there is still a problem that we discuss. We need more time to fix this. Sorry for the inconvenience.


lguenier free commented 5 years ago

I don't really see what the issue is to fix it, you just need to remove the duplicate functions and all should be good, it's what I did on the local copy of the files, the problem with doing that is that we can't have a continuous deployment and fully automated environments...


MDBootstrap staff commented 5 years ago

We are testing if only this is the case. Until we are 100% sure that this doesn't cause any further problems we won't implement it. We know that this is the main topic of the issue.


john.epperson free commented 5 years ago

Would it be of use to you if I provided my minimum edited version of mdb.js which removes the duplicate functions? I've removed only the bare minimum possible (as best I can tell) to get it running. Would having such a template help you achieve this faster or not really?


Bartłomiej Malanowski staff commented 5 years ago

Yes, this could be useful. I also want to remind that users with access to our GitLab can submit us a Merge Request with their changes


john.epperson free commented 5 years ago

I have privately sent the modified file (due to it being a pro version and not wanting to cause an issue by posting all of that).


bgoodfl pro answered 5 years ago


@kevin Berthier You can do one of the following

  1. follow the webpack tutorial which doesn't include mdb.js but includes the individual js files that are compiled within mdb.js
  2. Don't include the compiled mdb.js in your own webpack setup.
  3. Remove the duplicate functions. I found 4 function _classCallCheck, function _defineProperties, function _createClass, function _classCallCheck. They are exact duplicates and are why you are seeing the error. It looks like the developers all include common libraries which have these functions and they are not shaken out when MDB combines them all.

Bartłomiej Malanowski staff commented 5 years ago

I also added this issue to our bug list with high priority


bgoodfl pro commented 5 years ago

Is there a higher priority? The duplicate functions are in 4.8.2.


spidey priority commented 5 years ago

I also have the same issue when compiling MDB Pro jQuery version in Laravel Mix (Webpack core)


Bartłomiej Malanowski staff commented 5 years ago

This still wait to be fixed


kevin Berthier free answered 5 years ago


I have the same error when importing the main JS file from jq-pro in my main pack with Webpack

Do you have any tutorial to setup mdb PRO with webpack ?


Bartłomiej Malanowski staff commented 5 years ago

@kevin, how can we reproduce your issue? Answering your question, this guide will help you to install MDB with Webpack: https://mdbootstrap.com/articles/jquery/md-bootstrap-webpack-tutorial/



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.7.5
  • Device: all
  • Browser: all
  • OS: all
  • Provided sample code: No
  • Provided link: No
Tags