require("packages").resource does not work in a sandbox #80

kriszyp opened this Issue Dec 5, 2009 · 1 comment

1 participant


When I turn Jack's reloader functionality on, I get this error when I call the resource function in the packages module:
TypeError: Cannot read property "length" from undefined
at C:\dev\narwhal\lib\packages.js:9


I guess basically the issue is that some modules expect to really be singletons. Another module that behaves poorly when instantiated multiple times (as the reloader does) is the event-queue. Perhaps we need to include the modules option in the reloader middleware that includes "packages" and "event-queue" modules... But this certainly doesn't seem very scalable, it would be nice to be able to smarter selection of which modules get reloaded, like be able to have a sandbox that only reloads modules from a certain package (or packages).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment