Question on RequireJS and Jquery datatables

I received the following error:


Uncaught TypeError: Cannot read property 'oApi' of undefined

jquery datatables: DataTables-1.10.3
RequiresJS: RequireJS 2.1.18

main.js:
require.config({
    shim: {
        jquery: {
            export: '$'
        },
        jqueryui: { deps: ["jquery"] },
        'jquery.validate': { deps: ["jquery"] },
        'datatables': { deps: ["jquery"] },
        angular: {
            exports: 'angular',
            deps: ["jquery"]
        },
        angularApp: {
            exports: 'angularApp',
            deps: ['angular']
        },

        global: { deps: ["jquery"] }
    },
    paths: {
        jquery: ['//ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.0',
          // fallback to local jQuery
          //'libs/jquery'
          'jquery-2.1.0.min'
        ],
        'datatables': 'DataTables-1.10.3/jquery.dataTables',
        bootstrap: 'bootstrap',
        less: 'less.min',
        'jquery.validate': 'jquery.validate',
        domReady: 'libs/domReady',
        'angularApp': '/bundles/app?',
    }
});

// Require Global dependencies
require(['jquery', 'jquery.validate', 'jqueryui', 'global',
    'bootstrap',
    'less',
    'angularApp'
], function ($, jqvalidate, jqueryui, global) {

    // Since we're loading angular asynchronously, we must handle the bootstrapping process
    angular.module('orbit').init();

    // Load scripts for IE
    if ($('html').hasClass('lt-ie9') || $('html').hasClass('ie9')) {
        require(['/Scripts/jquery.placeholder.js'], function (ieScript) {
            // fix placeholders for IE9 and below
            $('input, textarea').placeholder();
        });

    }

});

_layout.cshtml:

        <script data-main="@Url.Content("~/Scripts/main")" src="@Url.Content("~/Scripts/libs/require.js")"></script>

I have spent over a day on this issue but couldn't configured it out.
Need help on the problem.

Thanks in advance
LVL 1
chuang4630Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
RequiresJS: RequireJS 2.1.18 but in your code
     jquery: ['//ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.0',
          // fallback to local jQuery
          //'libs/jquery'
          'jquery-2.1.0.min'

you don't have a reference to http://requirejs.org/docs/release/1.0.8/comments/require.js
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.