RequireJS “invalid require call” error

Ruh roh.

Uncaught Error: Invalid require call
http://requirejs.org/docs/errors.html#requireargs require.js:167
makeError require.js:167
localRequire require.js:1372
Module.fetch require.js:806
Module.check require.js:841
Module.enable require.js:1144
context.enable require.js:1512
(anonymous function) require.js:1129
(anonymous function) require.js:133
each require.js:58
Module.enable require.js:1091
Module.init require.js:775
(anonymous function) require.js:1417

That link up there pointing to the RequireJS site tersely states that this happens because you didn’t pass an array as the first parameter to require().

This error can also come from the shim portion of the config, if you (similarly) declare the deps as a bare string instead of an array. CoffeeScript example:

require.config shim:
  'underscore':
    exports: '_'
  'backbone':
    exports: 'Backbone'
    deps: ['jquery', 'underscore']
  'marionette':
    exports: 'Backbone.Marionette'
    #deps: 'backbone' # wrong
    deps: ['backbone'] # there we go
 
36
Kudos
 
36
Kudos

Now read this

sometimes iTunes doesn’t show the currently-playing song’s name and position

In the middle of the very top of iTunes, between the play/volume controls on the left and the search bar on the right, there’s a panel that normally shows the currently-playing song name and position, or device sync info, or CD burning... Continue →