cancel
Showing results for 
Search instead for 
Did you mean: 

How to fix these Javascript Errors?

How to fix these Javascript Errors?

Does anybody know what's causing these? Because of them, the checkout process sometimes doesn't work properly.

 

I'm really frustrated as we have a deadline, so any help would be greatly appreciated.

 

Our website is https://www.floweraddict.com

 

Thank you!

 

Error: Mismatched anonymous define() module: function( $ ) {

$.ui = $.ui || {};

var version = $.ui.version = "1.12.1";


/*!
 * jQuery UI Widget 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */

//>>label: Widget
//>>group: Core
//>>description: Provides a factory for creating stateful widgets with a common API.
//>>docs: http://api.jqueryui.com/jQuery.widget/
//>>demos: http://jqueryui.com/widget/



var widgetUuid = 0;
var widgetSlice = Array.prototype.slice;

$.cleanData = ( function( orig ) {
	return function( elems ) {
		var events, elem, i;
		for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
			try {

				// Only trigger remove when necessary to save time
				events = $._data( elem, "events" );
				if ( events && events.remove ) {
					$( elem ).triggerHandler( "remove" );
				}

			// Http://bugs.jquery.com/ticket/8235
			} catch ( e ) {}
		}
		orig( elems );
	};
} )( $.  require.js:166:17
TypeError: $.widget is not a function[Learn More]  dataPost.js:13:5
TypeError: $(...).owlCarousel is not a function[Learn More]  cart:975:45
TypeError: $.ui is undefined[Learn More]
1 REPLY

Re: How to fix these Javascript Errors?

@lordxtina

 

please compare below file with your js

 

https://github.com/magento/magento2/blob/2.1.7/lib/web/requirejs/require.js

please copy first into 

pub/static//frontend/Mgs/organie/en_US/requirejs/require.js then check it is work then copy into lib folder.