felixge / node-sandboxed-module

A sandboxed node.js module loader that lets you inject dependencies into your modules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-sandboxed-module test fails with node v0.6.10

cliffano opened this issue · comments

I picked up this error when building my module (which depends on sandboxed-module) on Travis after they upgraded node 0.6 to v0.6.10 .
The latest 0.6 sandboxed-module successful build was from back v0.6.1 http://travis-ci.org/#!/felixge/node-sandboxed-module/jobs/327889, so I believe it would fail too with v0.6.10 .

Here's the test output snippet:

kakashi:node-sandboxed-module cliffano$ make test
[0:00:00 0 0/10 0.0% node test/integration/test-basic.js]

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: ENOENT, no such file or directory 'U'
at Object.openSync (fs.js:230:18)
at Object.readFileSync (fs.js:120:15)
at SandboxedModule._getCompileInfo (/Users/cliffano/dev/workspace/node-sandboxed-module/lib/sandboxed_module.js:144:8)
at SandboxedModule._compile (/Users/cliffano/dev/workspace/node-sandboxed-module/lib/sandboxed_module.js:122:22)
at SandboxedModule._init (/Users/cliffano/dev/workspace/node-sandboxed-module/lib/sandboxed_module.js:63:8)
at Function.load (/Users/cliffano/dev/workspace/node-sandboxed-module/lib/sandboxed_module.js:25:19)
at testRequire (/Users/cliffano/dev/workspace/node-sandboxed-module/test/integration/test-basic.js:6:29)
at Object. (/Users/cliffano/dev/workspace/node-sandboxed-module/test/integration/test-basic.js:9:2)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)

... snip ...

[0:00:00 10 0/10 100.0% node test/integration/test-require.js]

This problem did not occur in v0.6.9, so it must be one of the latest changesets.

If I had to guess, it is probably due to this change, which changed the file resolution logic a little bit:
nodejs/node-v0.x-archive@840229a#lib/module.js

Not sure though - kind of a wild guess :)

I've submitted a patch for this problem. felixge/node-require-like#3

I guess this can be closed now?

Whoops, I forgot to close this.
Felix already upgraded node-require-like: b55b633#package.json