CleverStack / cleverstack-cli

CLI for CleverStack
http://youtube.com/watch?v=-4ArURHExhQ
MIT License
196 stars 33 forks source link

Module loader problem #15

Closed theocoria closed 10 years ago

theocoria commented 10 years ago

Hi Richard,

I updated to the newest version of cleverstack-cli today, just to make sure I have access to all the newest features. Install clever-orm and clever-auth and running all the unit test and e2e works fine. The problem comes in when I run 'clever new [someOrOtherModuleName]' and the backend part of the newly created module into the package.json file and run 'grunt db' from the backend context. I receive the following error:

$ grunt db Running "exec:rebase" (exec) task

/home/user/Projects/WSIMS/backend/modules/facility/module.js:4 Module = ModuleClass.extend({ ^ TypeError: Cannot call method 'extend' of undefined at Object. (/home/user/Projects/WSIMS/backend/modules/facility/module.js:4:22) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Class.module.exports.Class.extend.loadModule (/home/user/Projects/WSIMS/backend/lib/utils/moduleLoader.js:119:22) at class_cb (/home/user/Projects/WSIMS/backend/node_modules/uberclass/lib/class.js:94:43) at /home/user/Projects/WSIMS/backend/node_modules/async/lib/async.js:111:13 Exited with code: 8.

This did not happen on the older release and when comparing the old source to the new source I picked up that the module loader util was quite heavily refactored.

Is it a problem with the new version or am I missing something?

Kind regards, Martin

theocoria commented 10 years ago

On another point I also see that the unit test don't pass any more. The error looks like this:

clever test unit Scanning folders for Gruntfiles... Running "mochaTest:unit" (mochaTest) task

Controller 1) "before all" hook

utils .stacktrace() ✓ should return array ✓ should return stack stace beginning at current function ✓ should contain function names and filepaths

3 passing (10s) 1 failing

1) Controller "before all" hook: Error: timeout of 10000ms exceeded at null. (/home/theocoria/Projects/WSIMS/backend/node_modules/mocha/lib/runnable.js:139:19) at Timer.listOnTimeout as ontimeout

Warning: Task "mochaTest:unit" failed. Use --force to continue.

Aborted due to warnings.

pilsy commented 10 years ago

Hi Martin,

My apologies i haven't updated the templates used for generation of node-seed (backend) modules for version 1.0.x

I am updating them now and will push a new release shortly.

theocoria commented 10 years ago

Thanx so much Richard, that will be awesome....

pilsy commented 10 years ago

Closing this ticket, please use PR #16 for tracking