Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7525003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:13:02+00:00 2026-05-30T03:13:02+00:00

I’m getting a little frustrated with requirejs at this point. I’m trying to load

  • 0

I’m getting a little frustrated with requirejs at this point.

I’m trying to load jquery and other libraries in my App.coffee file. The problem is that I can’t load module dependencies in my define. Some of the input arguments (jq, jsn, etc) are null or just HTMLDocument objects. This changes based on the permutation of plugins that I try: ‘order’, ‘domReady’, or none.

My js lib directory looks like A). And my App.coffee file looks like B). I’ve tried to use ‘paths’ in the require.config and just raw file referencing (what you see below). I’m aware of requirejs-jquery integration. But shouldn’t I be able to order my plugin loading?

I get a different set of errors if I try named ‘paths’. I see someone suggested jquery 1.7 (also here). Is this working? I first wanted to take a step back and make sure that I have the concepts down correctly. i) require.config ii) module definition w/ dependencies, iii) the order plugin, etc.

If I have these concepts down correctly, I would think it’s a jquery version issue. However, it’s not just jquery as a dependency. And it’s incredibly irksome to lose time in this manner. Any help is appreciated. Thanks in advance.

A)


    $ tree js/lib/
    js/lib/
    ├── backbone.js
    ├── backbone_loader.js
    ├── domReady.js
    ├── jquery-1.6.3.js
    ├── json2.js
    ├── order.js
    ├── pure.js
    ├── require.js
    └── underscore.js

B)


    require.config({
      baseUrl: "/js",
      paths:
        order : '/js/lib/order'
        jQuery : '/js/lib/jquery-1.6.3'
        json2 : '/js/lib/json2'
        Underscore : '/js/lib/underscore'
        Backbone : '/js/lib/backbone_loader'
        pure : '/js/lib/pure'
    })


    define( [ 'js/lib/order!js/lib/jquery-1.6.3',
              'js/lib/order!js/lib/json2',
              'js/lib/order!js/lib/underscore',
              'js/lib/order!js/lib/backbone',
              'js/lib/order!js/lib/pure',
              'js/lib/order!js/bkeeping/models', ]
      (jq, jsn, und, bbn, pur, models) ->

        console.log('bkeeping LOADED')

        # return an object with the models in it  
        models : models
        jQuery : jq.noConflict()
        json2 : jsn 
        Underscore : und.noConflict()
        Backbone : bbn.noConflict()
        pure : pure
    )

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T03:13:03+00:00Added an answer on May 30, 2026 at 3:13 am

    Thanks for the direction on this.

    But I went to jquery-1.7, but still had to pull from the global space to get the object. That applies for my other libs for now, and their dependencies. What I ended up doing was returning an object with the dependencies in it. I got library loading done with the order plugin.

    The contract of dependency objects being passed into your callback function (jq,pur,jsn, etc), simply isn’t working for these libraries. It works for my defined modules (ex: models), but not external libs. I tried the use plugin, but found that it didn’t work for underscore and backbone, or I didn’t set it up properly. This is my workable solution for now; although I have to say that the headaches are seriously clouding the benefits for require.js.

    
        define( [ 'order!js/lib/jquery-1.7',
                  'order!js/lib/pure',
                  'order!js/lib/json2',
                  'order!js/lib/underscore',
                  'order!js/lib/backbone',
                  'order!bkeeping/models', ]
          (jq, pur, jsn, und, bbn, models) ->
    
            console.log('bkeeping LOADED')
    
            # return an object with the dependencies in it 
            models : models
            jQuery : jQuery.noConflict()
            pure : pur                      # pure and json2 objects are simply used in other libs. I don't need them directly
            json2 : jsn 
            Underscore : _.noConflict()
            Backbone : Backbone.noConflict()
        )
    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.