igorklopov / enclose

Compile your Node.js project into an executable
http://enclosejs.com
Other
936 stars 43 forks source link

Problems with MongoDB, Consolidate #21

Closed estvmachine closed 9 years ago

estvmachine commented 9 years ago

Hello i try to make a executable version of my project Mean.JS (http://meanjs.org/) but i have a problem with the exports of MongoDB and Consolidate, i make a screenshot of this situation.

image

So there are two issues i have to resolve.

  1. I have refactorize the require in MongoDB, the Enclose need a explicit path and here its loaded dynamically, but there are many methods...and really its no the only module i have this problem.

[ 'commands/base_command' , 'admin' , 'collection' , 'connection/read_preference' , 'connection/connection' , 'connection/server' , 'connection/mongos' , 'connection/repl_set/repl_set' , 'mongo_client' , 'cursor' , 'db' , 'mongo_client' , 'gridfs/grid' , 'gridfs/chunk' , 'gridfs/gridstore'].forEach(function (path) { var module = require('./' + path); for (var i in module) { exports[i] = module[i]; console.log(exports[i]); } });

  1. And for other side in the exportation of modules in Consolidate give the error "Cannot find module -name module- from path/consolidate/name_module", and when i check the "node-modules" of Consolidate, its empty. I dont know why...
igorklopov commented 9 years ago

Ok. I will try to fix

estvmachine commented 9 years ago

Thank you very much! :D