Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 80876

error(311) Missing dependency jQuery (3.1.0)

$
0
0

Hi,

I'm in the process of creating a new Mendix widget based on the jQuery plugin 'Fancytree'. According to the post below it should not be a problem using jQuery 3.1.0.

https://mxforum.mendix.com/questions/61752/Can-I-use-jQuery-version-3x-for-custom-widgets

However when i try to build my application or check my widgets via Mendix I get the following Dojo build errors:

error(311) Missing dependency. module: GapplessFancytree/lib/jquery-ui; dependency: jquery

error(311) Missing dependency. module: GapplessFancytree/lib/jquery.fancytree-all.min; dependency: jquery

error(311) Missing dependency. module: GapplessFancytree/lib/jquery.fancytree.buttonbar; dependency: jquery

I don't know if it has anything to do with using jQuery 3.0.1. I tried to test with other jQuery versions but it seems the plugin doesn't like that.

How can i solve my build errors?

define([
"dojo/_base/declare",
"mxui/widget/_WidgetBase",
"dijit/_TemplatedMixin",

"mxui/dom",
"dojo/dom",
"dojo/dom-prop",
"dojo/dom-geometry",
"dojo/dom-class",
"dojo/dom-style",
"dojo/dom-construct",
"dojo/_base/array",
"dojo/_base/lang",
"dojo/text",
"dojo/html",
"dojo/_base/event",

"dojo/text!GapplessFancytree/widget/template/GapplessFancytree.html",
"GapplessFancytree/lib/mxdb-helper",
"GapplessFancytree/lib/promise-polyfill",
"GapplessFancytree/lib/jquery-3.1.0",
"GapplessFancytree/lib/jquery-ui",
"GapplessFancytree/lib/jquery.fancytree-all.min",
"GapplessFancytree/lib/jquery.fancytree.buttonbar"

], function gftwidgetWrapper(declare, _WidgetBase, _TemplatedMixin, dom, dojoDom, dojoProp, dojoGeometry, dojoClass, dojoStyle, dojoConstruct, dojoArray, dojoLang, dojoText, dojoHtml, dojoEvent, widgetTemplate, mxdbhelper, _promisePolyfill, _jQuery, _jQueryUi, _fancytree, _fancytreeext_buttonbar) { "use strict";

// make a local reference from $ to the jQuery object 
// This avoids the risk of working with an overwritten jquery library by another plugin
// also Unlink jQuery and $ from the global scope
var $ = jQuery.noConflict(true);

Viewing all articles
Browse latest Browse all 80876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>