felixge / felixge/node-sandboxed-module
Having trouble with new version
- Dominant language
- JavaScript
- Stars
- 343
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
I've always used 0.3.0 in the past, so maybe there's just some upgrade thing I'm missing, but using 1.0.1, some (at least) of my stubs are not working. I'm using this wrapper:
``` coffee
SandboxedModule = require('sandboxed-module')
global.requireSubject = (path, requires, globals) ->
console.log requires
SandboxedModule.require("./../../#{path}", {requires, globals})
```
This is in spec/helpers, so the path part isn't the problem (it does try to load the module), but then it throws `[Error: Cannot find module 'ftoggleDir/.ftoggle.config'] code: 'MODULE_NOT_FOUND'`, but the console.log in the code above is logging (amongst other things):
``` javascript
'ftoggleDir/.ftoggle.config':
{ environments: [ 'production' ],
configDir: 'config',
production: { path: 'ftoggle.json' } }
```
This is a json file, and I see that some of the recent improvements are around json files. I _have_ tried it also with `.json` on the end. Is there something else I need to do to get 1.0.1 working?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.