felixge / felixge/node-sandboxed-module
Having trouble with new version
- Lingua principale
- JavaScript
- Stelle
- 343
- Fork
- 41
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.