v0.1.10 breaks Node's require() function #73

devijvers opened this Issue Sep 4, 2013 · 3 comments


None yet

2 participants


I get this exception:

        throw new Error("Invalid action : " + body + "\n" + e.message);
Error: Invalid action : ((function(){var io= scope.io;
    return require('/home/steven/dev/xxxxxxxxxxx/src/node/socket.io')
Cannot find module '/home/steven/dev/xxxxxxxxxxx/src/node/socket.io'
    at createFunction (/home/steven/dev/xxxxxxxxxxx/node_modules/nools/lib/compile/common.js:26:15)
    at /home/steven/dev/xxxxxxxxxxx/node_modules/nools/lib/compile/index.js:172:25
    at Array.forEach (native)
    at forEach (/home/steven/dev/xxxxxxxxxxx/node_modules/nools/node_modules/array-extended/index.js:176:21)
    at Object.exports.compile (/home/steven/dev/xxxxxxxxxxx/node_modules/nools/lib/compile/index.js:171:5)
    at Object.nools.compile (/home/steven/dev/xxxxxxxxxxx/node_modules/nools/lib/index.js:288:21)
    at Object.<anonymous> (/home/steven/dev/xxxxxxxxxxx/src/node/nools.js:3:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

I didn't have this problem with v0.1.9. To make sure I've downgraded and everything works A-OK.

C2FO member

What does your global declaration look like?


These are the four first lines:

global express = require("express");
global app = express();
global server = require("http").createServer(app);
global io = require("socket.io").listen(server, { log: false });
@doug-martin doug-martin added a commit to doug-martin/nools that referenced this issue Sep 4, 2013
@doug-martin doug-martin v0.1.11
* Fixed issue #73 where requires in dsl would treat a file with a `.` character as a path instead of a module.
@doug-martin doug-martin referenced this issue Sep 4, 2013

v0.1.11 #74

@doug-martin doug-martin was assigned Sep 4, 2013
C2FO member

Ok this should be fixed in v0.1.11.

@doug-martin doug-martin closed this Sep 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment