i was including a js file at


app/design/frontend///web/js/flexslider.js

Which was showing me the following errors:

flexslider.js:1218 Uncaught ReferenceError: jQuery is not defined
    at flexslider.js:1218
(anonymous) @ flexslider.js:1218
jquery-migrate.js:21 JQMIGRATE: Logging is active
(index):427 Uncaught TypeError: $(...).flexslider is not a function
    at (index):427
    at dispatch (jquery.js:5226)
    at elemData.handle (jquery.js:4878)

My requirejs-config has this in it:

var config = {

    // When load 'requirejs' always load the following files also
    deps: [
        "/static/frontend///en_US/js/flexslider.js"
    ]
};

after some research i found a solution.Actually The problem is: system loaded jquery after my js (our js need jquery for working).Then i Tried this

var config = {
map: {
    '*': {
        'flexslider': 'js/flexslider',


    }
}, 
paths: {
    'flexslider': 'js/flexslider',

},

shim: {
    'flexslider': {
        deps: ['jquery']
    },
};

and it started working !!