felixge / felixge/node-sandboxed-module
Having trouble with new version
- Vorherrschende Sprache
- JavaScript
- Sterne
- 343
- Forks
- 41
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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?
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.