Reputation: 46589
I've got three libraries that I am loading with require.js:
require(['lib/alpha', "lib/delta", "lib/gamma"], (alpha, delta, gamma) ->
# initialize objects from libraries etc.
They all look pretty similar:
# names changed for IP protection, so this code may look funny
define(->
class alpha
constructor: ({@type, @user, @data}) ->
@time = new Date()
)
define(->
class delta
constructor: ({@logger, @config, @socket, @util}) ->
#@logger.debug arguments
@room = null
(@util ?= {}).inspect ?= JSON.stringify
# more functions ...
)
define(->
class gamma
alphas = null
constructor: ({@logger, @config, @alphaUtility, @newId}) ->
throw 'alpha utility not defined' unless @alphaUtility?
# more functions ...
)
However, suddenly and for no reason that I can discern, delta
is suddenly not loading via require
. It's just undefined
in the callback.
Relevant details:
delta
in weeks delta
by itself has no effect I'm stumped here, how can I figure out why require won't load this file? I've stepped through the code a bit it's 2k lines so determining where it's failing is difficult.
Require 2.1.8 (current as of 9/24/2013)
Upvotes: 2
Views: 78
Reputation: 46589
It's been a while and there haven't been any answers, so I'll write one.
The require.js
dev suggested that this may have been a bug in Chrome 29. Since Chrome has now bumped to v30 and this issue has stopped happening, I have to assume that it is fixed.
Upvotes: 1