Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

binary modules #10

Open
dvv opened this Issue · 4 comments

2 participants

@dvv

Binary modules can't be require()d since nodules adds .js suffix to module name. If I make a symlink ln -s binmodule binmodule.js to simulate vanilla module, I get

rker){�ELF���
^
SyntaxError: Unexpected token ILLEGAL
at /home/dvv/NODE/nodules/lib/nodules.js:5:18
at createFactory (/home/dvv/NODE/nodules/lib/nodules.js:558:20)
at /home/dvv/NODE/nodules/lib/nodules.js:418:7
at /home/dvv/NODE/nodules/lib/nodules-utils/promise.js:299:10
at Function.ensure (/home/dvv/NODE/nodules/lib/nodules.js:400:11)
at /home/dvv/NODE/nodules/lib/nodules.js:544:15
at String.replace (native)
at /home/dvv/NODE/nodules/lib/nodules.js:542:12
at /home/dvv/NODE/nodules/lib/nodules-utils/promise.js:299:10
at /home/dvv/NODE/nodules/lib/nodules.js:540:10

Please, consider fixing

TIA,
--Vladimir

@kriszyp
Owner

Aren't binary modules supposed to end in .node? Nodules looks for .node binary modules.

@dvv

Hmmm. I failed to use node-mongodb-native with native bson module compiled. It is called bson.node but still doesn't get loaded

@dvv

More specific: http://gist.github.com/643545
What should I add to package.json so that native parser got correctly loaded?

TIA

@dvv

Found the bug: http://github.com/kriszyp/nodules/blob/master/lib/nodules.js#L794 should reference fs, not file

Please, consider fixing

--Vladimir

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.