How to require types from package

12 views
Skip to first unread message

Radu Stanciu

unread,
Apr 4, 2013, 4:44:39 AM4/4/13
to ka...@googlegroups.com
Hi everyone,

I am just starting to play with Kanso (I used CouchApp and Erica before) and it looks very promising.

I'm trying to isolate certain parts of my application into packages. I have the "products" package, and inside the files shows.js, lists.js and types.js. I load them all up with the package, and that works great.

However from the package's main products.js file (the one that I require from the main app) I try to do

var types = require('./types')

so I can I use them with my jQuery handlers, but I get the error Could not require module: types (from: products) - Module not found

If i require the file from the shows.js or lists.js file I have no problem, but not from the main package file.

Any help is greatly appreciated..

Kind regards,
Radu Stanciu
Reply all
Reply to author
Forward
0 new messages