question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to get working with RequireJS

See original GitHub issue

I am using the latest version 2.5.1 with requireJS. But it always give me undefined function error. Below is my configuration:

paths: {
    jquery: 'js/libs/jquery/jquery-2.1.1',
   'query-builder': 'js/libs/QueryBuilder/js/query-builder',
        'doT': 'js/libs/QueryBuilder/js/doT',
        'jquery.extendext': 'js/libs/QueryBuilder/js/jQuery.extendext'
  },
  shim: {
    'jquery.extendext': {
            deps: ['jquery'],
            exports: 'jquery.extendext'
        },
        'doT':
        {
            deps: ['jquery'],
            exports: 'doT'
        },
        'query-builder': {
            deps: ['jquery','jquery.extendext','doT'],
            exports: 'jquery.fn.queryBuilder'
        }
  }

Below is my calling on page


define([
  'jquery',
  'underscore',
  'backbone',
    'jquery.extendext', 'doT', 'query-builder',
    'bootstrap',
    
], function ($, _, Backbone) {
});

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mistic100commented, Mar 29, 2018

You should not need the shims, everything is well defined in the loader : https://github.com/mistic100/jQuery-QueryBuilder/blob/master/dist/js/query-builder.js#L8

Probably the key for doT in paths must be dot/doT. And in you app itself, just require query-builder unless you use doT and extendext yourself

0reactions
vedbhawsarcommented, Mar 30, 2018

Closing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Errors - RequireJS
The path configuration for a module is incorrect. Check the "Net" or "Network" tab in the browser's developer tools to see if there...
Read more >
require.js is not loading any modules - Stack Overflow
I am trying to load a module using require.js, and I have the following ... Is require.js silently failing on loading some submodule...
Read more >
Moodle in English: What is RequireJS doing?
I am having trouble getting a javascript library that worked up until 2.8, work on 2.9. It is a whiteboard called literallycanvas that...
Read more >
Require.js fails to load due to bad syntax - Qlik Community
js from an external app. I've try loading it both via CommonJS and AMD. Either way I get an error that says: Loading...
Read more >
Unable to get Buttons 1.3.2 to work with require JS and ...
I've been using DataTables, with the Responsive extension, for some time now and was recently asked to add some buttons that would allow ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found