Skip to content

yui-gallery modules cannot be required within /autoload/ dir #657

Closed
ItsAsbreuk opened this Issue Oct 23, 2012 · 3 comments

2 participants

@ItsAsbreuk

Hi,

Consider these 3 situations:

1) This works within /assets/
YUI.add('its-storagebag-items', function(Y, NAME) {
}, '0.0.1', {requires: ['node', 'gallery-storage-lite']});

2) This works within /autoload/
YUI.add('its-storagebag-items', function(Y, NAME) {
initializer: function () {
Y.use('gallery-storage-lite', function(){
});
}
}, '0.0.1', {requires: ['node']});

3) This DOES NOT work within /autoload/
YUI.add('its-storagebag-items', function(Y, NAME) {
}, '0.0.1', {requires: ['node', 'gallery-storage-lite']});

It will throw the next error:

/usr/lib/node_modules/mojito/lib/mojito.js:285
loader = new Y.mojito.Loader(appConfig);
^
TypeError: undefined is not a function
at MojitoServer._configureAppInstance (/usr/lib/node_modules/mojito/lib/mojito.js:285:14)
at new MojitoServer (/usr/lib/node_modules/mojito/lib/mojito.js:68:10)
at Object.createServer (/usr/lib/node_modules/mojito/lib/mojito.js:696:12)
at Object.run (/usr/lib/node_modules/mojito/lib/app/commands/start.js:81:18)
at main (/usr/lib/node_modules/mojito/lib/management/cli.js:125:13)
at Object. (/usr/lib/node_modules/mojito/lib/management/cli.js:137:1)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)

Regards,
Marco.

@caridy
caridy commented Oct 23, 2012

Can you specify the name of those files (including affinity)? also, what version of mojito are u using? and finally a copy of your application.json

@caridy
caridy commented Jan 29, 2013

@ItsAsbreuk, can you comment or close this? This should be working fine in 0.5.x

@ItsAsbreuk

Caridy,

Agreed, the problem is solved.
Closing the ticket. Thx!

@ItsAsbreuk ItsAsbreuk closed this Jan 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.