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

RequireJS / BackboneJS MDB Pro Fails to Load #203

Open
AlexDuvanenko opened this issue Dec 3, 2018 · 2 comments
Open

RequireJS / BackboneJS MDB Pro Fails to Load #203

AlexDuvanenko opened this issue Dec 3, 2018 · 2 comments

Comments

@AlexDuvanenko
Copy link

AlexDuvanenko commented Dec 3, 2018

Expected behavior

When upgrading from the free version to the pro version, there shouldn't be any errors using RequireJS.

Actual behavior

When upgrading from the free version to the pro version, getting lots of mismatched anonymous define() module errors, Waves is not defined errors in mdb.min.js, cannot read property 'defaults' of undefined errors, etc. The free version seemed to work just fine, minus the Waves is not defined, but when implementing the Pro version of MDB, we're getting lots of errors.

Your working environment and MDB version information

MDB Pro - v 4.5.14
RequireJS -

Resources (screenshots, code snippets etc.)

console

Sample requirejs config that is not working.
` requirejs
.config({
baseUrl : 'js/application',
priority : [ 'jquery' ],
waitSeconds : 2000,
urlArgs: "v=" + dateStamp,
paths : {
'jquery' : 'jquery/jquery-3.2.1.min',
'bootstrap' : 'plugins/bootstrap.bundle.min',
'mdb' : 'plugins/mdbootstrap/mdb.min'
},
shim : {
'jquery' : {},

			 'bootstrap' : {
				 deps : [ 'jquery' ]
			 },
			 'mdb' : {
				 deps : ['bootstrap', 'jquery']
			 },
			
		 }
	 });

requirejs.onError = function(err) {
var errorMsg = err.requireType + ": '" + err.message + "' in " + err.fileName + " on Line: " + err.lineNumber;
console.error(errorMsg);
};
requirejs([ 'app', 'backbone',
'jquery', 'bootstrap', 'mdb'],
function(app, backbone,$,bootstrap, mdb) {
'use strict';

 app.initialize();

}); `
For every question of technical nature, in order to get the most detailed answer as soon as possible, ask on our dedicated Support Forum

@zsyphon
Copy link

zsyphon commented Dec 3, 2018

Great question! I'm having the same problem and have yet to resolve it.

I've followed the suggestions in this post, but nothing is working.

https://mdbootstrap.com/support/general/proper-structure-for-using-with-requirejs-urgent/

@mattonit
Copy link
Contributor

mattonit commented Dec 6, 2018

We were asked about integration with Require JS many times, but we didn't try it yet. I cannot promise you guys if this will happen soon. However, I'll leave this issue open so maybe one day someone will find a solution for this issue

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