According to the Require JS docs it's on of the following cases:
Be sure to load all scripts that call define() via the RequireJS API.
Do not manually code script tags in HTML to load scripts that have
define() calls in them.
If you manually code an HTML script tag, be sure it only includes
named modules, and that an anonymous module that will have the same
name as one of the modules in that file is not loaded.
If the problem is the use of loader plugins or anonymous modules but
the RequireJS optimizer is not used for file bundling, use the
If the problem is the var define lint approach, use /*global define
*/ (no space before "global") comment style instead.
If you manually code a script tag in HTML to load a script with an anonymous define() call, this error can occur.
If you manually code a script tag in HTML to load a script that has a few named modules, but then try to load an anonymous module that ends up having the same name as one of the named modules in the script loaded by the manually coded script tag.
If you use the loader plugins or anonymous modules (modules that call define() with no string ID) but do not use the RequireJS optimizer to combine files together, this error can occur. The optimizer knows how to name anonymous modules correctly so that they can be combined with other modules in an optimized file.
If you use var define; at the top of your file for jshint/jslint purposes, this will cause a problem for the optimizer because it avoids parsing files that declare a define variable, since that may indicate a script that was created by a concatenation of some scripts that use a local define.